Skip to content

Commit 58ca6b7

Browse files
committed
Revert "fix js2rt to not convert js promise into rt object (segfault) (#1879)"
This reverts commit eb5c207.
1 parent 53d4779 commit 58ca6b7

File tree

5 files changed

+2
-218
lines changed

5 files changed

+2
-218
lines changed

src/rtObject.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ rtError rtEmit::Send(int numArgs, const rtValue* args, rtValue* result)
158158
//
159159
// pass NULL as final argument for indication of asynchronous call
160160
err = e.f->Send(numArgs-1, args+1, &discard);
161-
if (result)
162-
*result = discard;
163161
#else
164162

165163
#warning " >>>>>> No SYNC EVENTS... stopPropagation() will be broken !!"

src/rtScriptV8/rtWrapperUtils.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -497,13 +497,8 @@ rtValue js2rt(v8::Local<v8::Context>& ctx, const Handle<Value>& val, rtWrapperEr
497497
// It's very possible that someone is trying to use another wrapped object
498498
// from some other native addon. Maybe that would actuall work and fail
499499
// at a lower level?
500-
501500
Local<Object> obj = val->ToObject();
502-
503-
if (obj->InternalFieldCount() > 0
504-
&& !val->IsArrayBufferView() // JS Buffer
505-
&& !val->IsPromise() // JS Promise
506-
)
501+
if (obj->InternalFieldCount() > 0 && !val->IsArrayBufferView() /*Buffer*/)
507502
{
508503
return rtObjectWrapper::unwrapObject(obj);
509504
}

tests/pxScene2d/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ set(TEST_SOURCE_FILES pxscene2dtestsmain.cpp test_rtThreadPool.cpp test_example
162162
test_rtUrlUtils.cpp test_pxArchive.cpp test_pxPixel_h.cpp test_pxFont.cpp test_utf8.cpp
163163
test_rtSettings.cpp test_cors.cpp test_external.cpp test_pxScene2d.cpp test_oscillate.cpp test_rtPathUtils.cpp
164164
test_rtError.cpp test_import_resources.cpp test_rtHttpRequest.cpp test_rtHttpResponse.cpp test_imagecacheSVG.cpp test_rtObjectWrapper.cpp
165-
test_baseFilePath.cpp test_js2rt.cpp ${TEST_WAYLAND_SOURCE_FILES})
165+
test_baseFilePath.cpp ${TEST_WAYLAND_SOURCE_FILES})
166166

167167
if (DEFINED ENV{USE_HTTP_CACHE})
168168
message("Include http cache tests")

tests/pxScene2d/supportfiles/js2rt.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

tests/pxScene2d/test_js2rt.cpp

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)