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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1061503005: bindings: Use Maybe version of Call() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/bindings/modules/v8/custom/V8CustomSQLStatementErrorCallback.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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 889
890 void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(int worldID, const W ebScriptSource* sourcesIn, unsigned numSources, int extensionGroup, bool userGes ture, WebScriptExecutionCallback* callback) 890 void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(int worldID, const W ebScriptSource* sourcesIn, unsigned numSources, int extensionGroup, bool userGes ture, WebScriptExecutionCallback* callback)
891 { 891 {
892 ASSERT(frame()); 892 ASSERT(frame());
893 RELEASE_ASSERT(worldID > 0); 893 RELEASE_ASSERT(worldID > 0);
894 RELEASE_ASSERT(worldID < EmbedderWorldIdLimit); 894 RELEASE_ASSERT(worldID < EmbedderWorldIdLimit);
895 895
896 SuspendableScriptExecutor::createAndRun(frame(), worldID, createSourcesVecto r(sourcesIn, numSources), extensionGroup, userGesture, callback); 896 SuspendableScriptExecutor::createAndRun(frame(), worldID, createSourcesVecto r(sourcesIn, numSources), extensionGroup, userGesture, callback);
897 } 897 }
898 898
899 // TODO(bashi): Consider returning MaybeLocal.
899 v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Loc al<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8 ::Value> argv[]) 900 v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Loc al<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8 ::Value> argv[])
900 { 901 {
901 ASSERT(frame()); 902 ASSERT(frame());
902 // TODO(bashi): Change the signature of callFunctionEvenIfScriptDisabled() 903 v8::Local<v8::Value> result;
903 // so that it takes v8::Local instead of v8::Handle. 904 if (!frame()->script().callFunction(function, receiver, argc, static_cast<v8 ::Local<v8::Value>*>(argv)).ToLocal(&result))
904 return frame()->script().callFunction(function, receiver, argc, argv); 905 return v8::Local<v8::Value>();
906 return result;
905 } 907 }
906 908
907 v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const 909 v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const
908 { 910 {
909 return toV8Context(frame(), DOMWrapperWorld::mainWorld()); 911 return toV8Context(frame(), DOMWrapperWorld::mainWorld());
910 } 912 }
911 913
912 void WebLocalFrameImpl::reload(bool ignoreCache) 914 void WebLocalFrameImpl::reload(bool ignoreCache)
913 { 915 {
914 ASSERT(frame()); 916 ASSERT(frame());
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 { 2100 {
2099 m_frameWidget = frameWidget; 2101 m_frameWidget = frameWidget;
2100 } 2102 }
2101 2103
2102 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const 2104 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const
2103 { 2105 {
2104 return m_frameWidget; 2106 return m_frameWidget;
2105 } 2107 }
2106 2108
2107 } // namespace blink 2109 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/modules/v8/custom/V8CustomSQLStatementErrorCallback.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698