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

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

Issue 622333002: Flip the true/false result of ScriptState::contextIsValid (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months 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 | « Source/bindings/core/v8/ScheduledAction.cpp ('k') | Source/bindings/core/v8/ScriptDebugServer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index 6a38d7003a977f706b42ef98d375c14c1db87e35..fd2ff242eb5269d17830dd6ca1a8cdc4cd08a1aa 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -263,7 +263,7 @@ TextPosition ScriptController::eventHandlerPosition() const
void ScriptController::bindToWindowObject(LocalFrame* frame, const String& key, NPObject* object)
{
ScriptState* scriptState = ScriptState::forMainWorld(frame);
- if (scriptState->contextIsValid())
+ if (!scriptState->contextIsValid())
return;
ScriptState::Scope scope(scriptState);
@@ -372,7 +372,7 @@ static NPObject* createNoScriptObject()
static NPObject* createScriptObject(LocalFrame* frame, v8::Isolate* isolate)
{
ScriptState* scriptState = ScriptState::forMainWorld(frame);
- if (scriptState->contextIsValid())
+ if (!scriptState->contextIsValid())
return createNoScriptObject();
ScriptState::Scope scope(scriptState);
@@ -408,7 +408,7 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
return createNoScriptObject();
ScriptState* scriptState = ScriptState::forMainWorld(m_frame);
- if (scriptState->contextIsValid())
+ if (!scriptState->contextIsValid())
return createNoScriptObject();
ScriptState::Scope scope(scriptState);
« no previous file with comments | « Source/bindings/core/v8/ScheduledAction.cpp ('k') | Source/bindings/core/v8/ScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698