Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2605853002: Remove an isContextInitialized() check from ScriptController::executeScriptInIsolatedWorld (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index 602e2bd0ff793506ad32db9548b2391e406c612b..b0e2168e0c3ae03f8cb8915a0b7abcb96571c123 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -472,10 +472,9 @@ void ScriptController::executeScriptInIsolatedWorld(
RefPtr<DOMWrapperWorld> world =
DOMWrapperWorld::ensureIsolatedWorld(isolate(), worldID, extensionGroup);
WindowProxy* isolatedWorldWindowProxy = windowProxy(*world);
- if (!isolatedWorldWindowProxy->isContextInitialized())
- return;
-
ScriptState* scriptState = isolatedWorldWindowProxy->getScriptState();
+ if (!scriptState->contextIsValid())
+ return;
v8::Context::Scope scope(scriptState->context());
v8::Local<v8::Array> resultArray = v8::Array::New(isolate(), sources.size());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698