Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions examples/pxScene2d/external/node-v10.15.3_mods.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1602,3 +1602,47 @@ index 3cbeae6d6..67bf832a0 100755

#ifdef _WIN32
static void SetSimultaneousAccepts(
diff --git a/examples/pxScene2d/external/libnode-v10.15.3/deps/v8/src/builtins/builtins-function.cc b/examples/pxScene2d/external/libnode-v10.15.3/deps/v8/src/builtins/builtins-function.cc
index df1dc19..d7d5bbf 100755
--- a/examples/pxScene2d/external/libnode-v10.15.3/deps/v8/src/builtins/builtins-function.cc
+++ b/examples/pxScene2d/external/libnode-v10.15.3/deps/v8/src/builtins/builtins-function.cc
@@ -12,6 +12,12 @@
#include "src/objects-inl.h"
#include "src/objects/api-callbacks.h"
#include "src/string-builder.h"
+/* MODIFIED CODE BEGIN */
+#include "src/api.h"
+#include "src/handles.h"
+
+using Utils = v8::Utils;
+/* MODIFIED CODE END */

namespace v8 {
namespace internal {
@@ -35,6 +41,10 @@ MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate,
}

// Build the source string.
+/* MODIFIED CODE BEGIN */
+ v8::Local<v8::Context> callingCtx = reinterpret_cast<v8::Isolate*>(isolate)->GetCallingContext();
+ Handle<Context> callingCtxHandle = Utils::OpenHandle(*callingCtx);
+/* MODIFIED CODE END */
Handle<String> source;
int parameters_end_pos = kNoSourcePosition;
{
@@ -103,12 +113,14 @@ MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate,
// come from here.
Handle<JSFunction> function;
{
+/* MODIFIED CODE BEGIN */
ASSIGN_RETURN_ON_EXCEPTION(
isolate, function,
Compiler::GetFunctionFromString(
- handle(target->native_context(), isolate), source,
+ handle(*callingCtxHandle, isolate), source,
ONLY_SINGLE_FUNCTION_LITERAL, parameters_end_pos),
Object);
+/* MODIFIED CODE END */
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION(
isolate, result,
3 changes: 0 additions & 3 deletions tests/pxScene2d/test_imagecache.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*

pxCore Copyright 2005-2018 John Robinson

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -46,7 +45,6 @@ limitations under the License.
using namespace std;
bool defaultCallbackExecuted = false;
extern void startFileDownloadInBackground(void* data);
extern bool continueDownloadHandleCheck;

// disabled as it causes crash
// please note that realloc is also extensively
Expand Down Expand Up @@ -834,7 +832,6 @@ class rtFileDownloaderTest : public testing::Test, public commonTestFns
expectedStatusCode = 0;
expectedHttpCode = 0;
expectedCachePresence = false;
continueDownloadHandleCheck = false;
}

virtual void TearDown()
Expand Down