Commit 3d044ba6 authored by haraken's avatar haraken Committed by Commit bot

Remove an isContextInitialized() check from ScriptController::executeScriptInIsolatedWorld

By checking scriptState->contextIsValid(), we don't need to check isContextInitialized().

BUG=677253

Review-Url: https://codereview.chromium.org/2605853002
Cr-Commit-Position: refs/heads/master@{#440841}
parent 45830933
...@@ -468,10 +468,9 @@ void ScriptController::executeScriptInIsolatedWorld( ...@@ -468,10 +468,9 @@ void ScriptController::executeScriptInIsolatedWorld(
RefPtr<DOMWrapperWorld> world = RefPtr<DOMWrapperWorld> world =
DOMWrapperWorld::ensureIsolatedWorld(isolate(), worldID, extensionGroup); DOMWrapperWorld::ensureIsolatedWorld(isolate(), worldID, extensionGroup);
WindowProxy* isolatedWorldWindowProxy = windowProxy(*world); WindowProxy* isolatedWorldWindowProxy = windowProxy(*world);
if (!isolatedWorldWindowProxy->isContextInitialized())
return;
ScriptState* scriptState = isolatedWorldWindowProxy->getScriptState(); ScriptState* scriptState = isolatedWorldWindowProxy->getScriptState();
if (!scriptState->contextIsValid())
return;
v8::Context::Scope scope(scriptState->context()); v8::Context::Scope scope(scriptState->context());
v8::Local<v8::Array> resultArray = v8::Array::New(isolate(), sources.size()); v8::Local<v8::Array> resultArray = v8::Array::New(isolate(), sources.size());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment