diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-22 10:05:46 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-22 10:41:27 +0000 |
commit | 293e8de891f03c47d336bb91aa631d496f19fdb3 (patch) | |
tree | efb9d210112e2d4a5d37124a647eaa8592b48308 | |
parent | 1d4b4cd52d4bb2586b86cc97923c1195a7aaa60d (diff) |
Fix assert in ExecuteScriptInIsolatedWorldv5.11.0-beta3
Avoid initializing results when results are not requested.
Task-number: QTBUG-66338
Change-Id: I3a3ba2e3c16b83809ccdc64a8a14eba1b504cfe8
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | chromium/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/chromium/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp index c4e7f6ac81d..177ec5ba00f 100644 --- a/chromium/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp +++ b/chromium/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp @@ -367,6 +367,8 @@ void ScriptController::ExecuteScriptInIsolatedWorld( for (size_t i = 0; i < sources.size(); ++i) { v8::Local<v8::Value> evaluation_result = ExecuteScriptAndReturnValue(context, sources[i]); + if (!results) + continue; if (evaluation_result.IsEmpty()) evaluation_result = v8::Local<v8::Value>::New(GetIsolate(), v8::Undefined(GetIsolate())); |