| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |