Changeset 56972 in webkit
- Timestamp:
- Apr 1, 2010 11:09:07 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r56968 r56972 1 2010-04-01 Jay Civelli <jcivelli@google.com> 2 3 Reviewed by David Levin. 4 5 Adds a method to WebFrame to execute JavaScript and get the value 6 it evaluates to. 7 https://bugs.webkit.org/show_bug.cgi?id=36907 8 9 * public/WebFrame.h: 10 * src/WebFrameImpl.cpp: 11 (WebKit::WebFrameImpl::executeScriptAndReturnValue): 12 * src/WebFrameImpl.h: 13 1 14 2010-04-01 Kinuko Yasuda <kinuko@chromium.org> 2 15 -
trunk/WebKit/chromium/public/WebFrame.h
r55814 r56972 40 40 namespace v8 { 41 41 class Context; 42 class Value; 43 template <class T> class Handle; 42 44 template <class T> class Local; 43 45 } … … 226 228 227 229 #if WEBKIT_USING_V8 230 // Executes script in the context of the current page and returns the value 231 // that the script evaluated to. 232 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( 233 const WebScriptSource&) = 0; 234 228 235 // Returns the V8 context for this frame, or an empty handle if there 229 236 // is none. -
trunk/WebKit/chromium/src/WebFrameImpl.cpp
r56958 r56972 780 780 781 781 #if USE(V8) 782 v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue( 783 const WebScriptSource& source) 784 { 785 return m_frame->script()->executeScript( 786 ScriptSourceCode(source.code, source.url, source.startLine)).v8Value(); 787 } 788 782 789 // Returns the V8 context for this frame, or an empty handle if there is none. 783 790 v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const -
trunk/WebKit/chromium/src/WebFrameImpl.h
r56212 r56972 102 102 virtual void collectGarbage(); 103 103 #if WEBKIT_USING_V8 104 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( 105 const WebScriptSource&); 104 106 virtual v8::Local<v8::Context> mainWorldScriptContext() const; 105 107 #endif
Note: See TracChangeset
for help on using the changeset viewer.