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

Side by Side Diff: Source/bindings/dart/DartUtilities.cpp

Issue 18169002: Improve Dart Debugger performance and robustness by creating Dart wrappers using the standard SetNa… (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Code review fixes Created 7 years, 5 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/dart/DartHandleProxy.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 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // 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 14 matching lines...) Expand all
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "bindings/dart/DartUtilities.h" 31 #include "bindings/dart/DartUtilities.h"
32 32
33 #include "DartMessagePort.h" 33 #include "DartMessagePort.h"
34 #include "bindings/dart/DartDOMData.h" 34 #include "bindings/dart/DartDOMData.h"
35 #include "bindings/dart/DartDebugServer.h" 35 #include "bindings/dart/DartHandleProxy.h"
36 #include "bindings/dart/V8Converter.h" 36 #include "bindings/dart/V8Converter.h"
37 #include "bindings/v8/ScriptController.h" 37 #include "bindings/v8/ScriptController.h"
38 #include "bindings/v8/SerializedScriptValue.h" 38 #include "bindings/v8/SerializedScriptValue.h"
39 #include "core/dom/Document.h" 39 #include "core/dom/Document.h"
40 #include "core/html/canvas/DataView.h" 40 #include "core/html/canvas/DataView.h"
41 #include "core/inspector/ScriptArguments.h" 41 #include "core/inspector/ScriptArguments.h"
42 #include "core/inspector/ScriptCallStack.h" 42 #include "core/inspector/ScriptCallStack.h"
43 #include "core/loader/FrameLoader.h" 43 #include "core/loader/FrameLoader.h"
44 #include "core/page/DOMWindow.h" 44 #include "core/page/DOMWindow.h"
45 #include "core/page/Frame.h" 45 #include "core/page/Frame.h"
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 } 813 }
814 814
815 bool DartUtilities::processingUserGesture() 815 bool DartUtilities::processingUserGesture()
816 { 816 {
817 // FIXME: implement this. 817 // FIXME: implement this.
818 return false; 818 return false;
819 } 819 }
820 820
821 PassRefPtr<ScriptArguments> DartUtilities::createScriptArguments(Dart_Handle arg ument, Dart_Handle& exception) 821 PassRefPtr<ScriptArguments> DartUtilities::createScriptArguments(Dart_Handle arg ument, Dart_Handle& exception)
822 { 822 {
823 v8::Handle<v8::Value> v8Argument = DartDebugServer::convertInspectedValue(ar gument); 823 v8::Handle<v8::Value> v8Argument = DartHandleProxy::create(argument);
824 Vector<ScriptValue> arguments; 824 Vector<ScriptValue> arguments;
825 arguments.append(v8Argument); 825 arguments.append(v8Argument);
826 ScriptState* scriptState = ScriptState::forContext(currentV8Context()); 826 ScriptState* scriptState = ScriptState::forContext(currentV8Context());
827 return ScriptArguments::create(scriptState, arguments); 827 return ScriptArguments::create(scriptState, arguments);
828 } 828 }
829 829
830 PassRefPtr<ScriptCallStack> DartUtilities::createScriptCallStack() 830 PassRefPtr<ScriptCallStack> DartUtilities::createScriptCallStack()
831 { 831 {
832 // FIXME: wrap current dart call stack as ScriptCallStack. 832 // FIXME: wrap current dart call stack as ScriptCallStack.
833 Vector<ScriptCallFrame> wrappedCallFrames; 833 Vector<ScriptCallFrame> wrappedCallFrames;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 Dart_Handle library = htmlLibraryForCurrentIsolate(); 980 Dart_Handle library = htmlLibraryForCurrentIsolate();
981 ASSERT(!Dart_IsError(library)); 981 ASSERT(!Dart_IsError(library));
982 982
983 Dart_Handle utilsClass = Dart_GetType(library, Dart_NewStringFromCString("_U tils"), 0, 0); 983 Dart_Handle utilsClass = Dart_GetType(library, Dart_NewStringFromCString("_U tils"), 0, 0);
984 ASSERT(!Dart_IsError(utilsClass)); 984 ASSERT(!Dart_IsError(utilsClass));
985 985
986 return Dart_Invoke(utilsClass, Dart_NewStringFromCString(methodName), argCou nt, args); 986 return Dart_Invoke(utilsClass, Dart_NewStringFromCString(methodName), argCou nt, args);
987 } 987 }
988 988
989 } 989 }
OLDNEW
« no previous file with comments | « Source/bindings/dart/DartHandleProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698