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

Side by Side Diff: Source/web/WebPluginContainerImpl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement() 429 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement()
430 { 430 {
431 LocalFrame* frame = m_element->document().frame(); 431 LocalFrame* frame = m_element->document().frame();
432 if (!frame) 432 if (!frame)
433 return v8::Local<v8::Object>(); 433 return v8::Local<v8::Object>();
434 434
435 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) 435 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
436 return v8::Local<v8::Object>(); 436 return v8::Local<v8::Object>();
437 437
438 ScriptState* scriptState = ScriptState::forMainWorld(frame); 438 ScriptState* scriptState = ScriptState::forMainWorld(frame);
439 if (scriptState->contextIsValid()) 439 if (!scriptState->contextIsValid())
440 return v8::Local<v8::Object>(); 440 return v8::Local<v8::Object>();
441 441
442 v8::Handle<v8::Value> v8value = toV8(m_element, scriptState->context()->Glob al(), scriptState->isolate()); 442 v8::Handle<v8::Value> v8value = toV8(m_element, scriptState->context()->Glob al(), scriptState->isolate());
443 ASSERT(v8value->IsObject()); 443 ASSERT(v8value->IsObject());
444 444
445 return v8::Handle<v8::Object>::Cast(v8value); 445 return v8::Handle<v8::Object>::Cast(v8value);
446 } 446 }
447 447
448 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup sAllowed) 448 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup sAllowed)
449 { 449 {
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 962
963 return clipRect; 963 return clipRect;
964 } 964 }
965 965
966 bool WebPluginContainerImpl::pluginShouldPersist() const 966 bool WebPluginContainerImpl::pluginShouldPersist() const
967 { 967 {
968 return m_webPlugin->shouldPersist(); 968 return m_webPlugin->shouldPersist();
969 } 969 }
970 970
971 } // namespace blink 971 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698