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

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

Issue 466243002: Support merged Dart-JS callstacks (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 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
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // FIXMEDART: Should have a variant that takes a Dart_NativeArguments to avo id TLS. 230 // FIXMEDART: Should have a variant that takes a Dart_NativeArguments to avo id TLS.
231 static DartScriptState* currentScriptState(); 231 static DartScriptState* currentScriptState();
232 232
233 static bool processingUserGesture(); 233 static bool processingUserGesture();
234 234
235 static PassRefPtr<ScriptArguments> createScriptArguments(Dart_Handle argumen t, Dart_Handle& exception); 235 static PassRefPtr<ScriptArguments> createScriptArguments(Dart_Handle argumen t, Dart_Handle& exception);
236 236
237 static PassRefPtr<ScriptCallStack> createScriptCallStack(); 237 static PassRefPtr<ScriptCallStack> createScriptCallStack();
238 static ScriptCallFrame getTopFrame(Dart_StackTrace, Dart_Handle& exception); 238 static ScriptCallFrame getTopFrame(Dart_StackTrace, Dart_Handle& exception);
239 static ScriptCallFrame toScriptCallFrame(Dart_ActivationFrame, Dart_Handle& exception); 239 static ScriptCallFrame toScriptCallFrame(Dart_ActivationFrame, Dart_Handle& exception);
240 240 static size_t currentStackDepth();
241 static const uint8_t* fullSnapshot(LocalFrame*); 241 static const uint8_t* fullSnapshot(LocalFrame*);
242 242
243 static Dart_Handle canonicalizeUrl(Dart_Handle library, Dart_Handle urlHandl e, String url); 243 static Dart_Handle canonicalizeUrl(Dart_Handle library, Dart_Handle urlHandl e, String url);
244 244
245 static void reportProblem(ExecutionContext*, const String&, int line = 0, in t col = 0); 245 static void reportProblem(ExecutionContext*, const String&, int line = 0, in t col = 0);
246 static void reportProblem(ExecutionContext*, Dart_Handle); 246 static void reportProblem(ExecutionContext*, Dart_Handle);
247 static void reportProblem(ExecutionContext*, Dart_Handle, const String& sour ceURL); 247 static void reportProblem(ExecutionContext*, Dart_Handle, const String& sour ceURL);
248 248
249 static Dart_Handle invalidNumberOfArgumentsException() 249 static Dart_Handle invalidNumberOfArgumentsException()
250 { 250 {
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 Dart_Isolate m_isolate; 878 Dart_Isolate m_isolate;
879 Dart_Isolate m_previousIsolate; 879 Dart_Isolate m_previousIsolate;
880 }; 880 };
881 881
882 class V8Scope { 882 class V8Scope {
883 public: 883 public:
884 explicit V8Scope(DartDOMData*, v8::Handle<v8::Context>); 884 explicit V8Scope(DartDOMData*, v8::Handle<v8::Context>);
885 V8Scope(DartDOMData*); 885 V8Scope(DartDOMData*);
886 ~V8Scope(); 886 ~V8Scope();
887 private: 887 private:
888 void incrementRecursionLevel();
889
888 v8::Isolate* m_v8Isolate; 890 v8::Isolate* m_v8Isolate;
889 DartDOMData* m_dartDOMData; 891 DartDOMData* m_dartDOMData;
890 v8::HandleScope m_handleScope; 892 v8::HandleScope m_handleScope;
891 v8::Context::Scope m_contextScope; 893 v8::Context::Scope m_contextScope;
892 V8RecursionScope m_recursionScope; 894 V8RecursionScope m_recursionScope;
893 }; 895 };
894 896
895 struct DartNativeEntry { 897 struct DartNativeEntry {
896 Dart_NativeFunction nativeFunction; 898 Dart_NativeFunction nativeFunction;
897 intptr_t argumentCount; 899 intptr_t argumentCount;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 timerStop = currentTimeMS(); \ 956 timerStop = currentTimeMS(); \
955 fprintf(stdout, "%s %.3f ms\n", msg, (timerStop - timerStart)); 957 fprintf(stdout, "%s %.3f ms\n", msg, (timerStop - timerStart));
956 #else 958 #else
957 #define DART_START_TIMER() 959 #define DART_START_TIMER()
958 #define DART_RECORD_TIMER(msg) 960 #define DART_RECORD_TIMER(msg)
959 #endif 961 #endif
960 962
961 } // namespace WebCore 963 } // namespace WebCore
962 964
963 #endif // DartUtilities_h 965 #endif // DartUtilities_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698