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

Unified Diff: Source/WebCore/bindings/dart/DartIsolateState.cpp

Issue 9260001: Instrumentations to trace Swarm startup. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/bindings/dart/DartController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/dart/DartIsolateState.cpp
diff --git a/Source/WebCore/bindings/dart/DartIsolateState.cpp b/Source/WebCore/bindings/dart/DartIsolateState.cpp
index 9445e22dec4b53f49af7dde7dcf77cd4e465bdbd..5608422db2283f883c333d018298748a9a7c4610 100644
--- a/Source/WebCore/bindings/dart/DartIsolateState.cpp
+++ b/Source/WebCore/bindings/dart/DartIsolateState.cpp
@@ -33,6 +33,7 @@
#include "DartController.h"
#include "DartDOMWrapper.h"
#include "DartUtilities.h"
+#include "InspectorInstrumentation.h"
namespace WebCore {
@@ -58,9 +59,27 @@ void DartIsolateState::popLink()
m_current = previous;
}
+class Timeline {
+public:
+ Timeline(Frame* frame, String tag)
+ {
+ m_cookie = InspectorInstrumentation::willEvaluateScript(frame, tag, 0);
+ }
+
+ ~Timeline()
+ {
+ InspectorInstrumentation::didEvaluateScript(m_cookie);
+ }
+
+private:
+ InspectorInstrumentationCookie m_cookie;
+};
+
+
// Creates a new isolates and sets it as the current.
Dart_Isolate DartIsolateState::create(ScriptExecutionContext* context, void* data)
{
+ Frame* f = static_cast<Document*>(context)->frame();
if (m_current) {
ASSERT(m_current->isolate && m_current->isolate == Dart_CurrentIsolate());
Dart_ExitIsolate();
@@ -68,7 +87,11 @@ Dart_Isolate DartIsolateState::create(ScriptExecutionContext* context, void* dat
// FIXME: proper error reporting.
char* errorMsg = 0;
ASSERT(data);
- Dart_Isolate isolate = Dart_CreateIsolate(DartUtilities::fullSnapshot(), data, &errorMsg);
+ Dart_Isolate isolate;
+ {
+ Timeline t0(f, "Dart_CreateIsolate");
+ isolate = Dart_CreateIsolate(DartUtilities::fullSnapshot(), data, &errorMsg);
+ }
pushLink(isolate);
ASSERT(Dart_CurrentIsolate() == isolate);
DartController::setupDOMEnabledIsolate(context);
« no previous file with comments | « Source/WebCore/bindings/dart/DartController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698