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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2733093003: DevTools: instrument user callbacks based on generic probes, remove NativeBreakpoint. (Closed)
Patch Set: test fixed Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 } // namespace 120 } // namespace
121 121
122 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue( 122 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(
123 v8::Local<v8::Context> context, 123 v8::Local<v8::Context> context,
124 const ScriptSourceCode& source, 124 const ScriptSourceCode& source,
125 AccessControlStatus accessControlStatus) { 125 AccessControlStatus accessControlStatus) {
126 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", 126 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data",
127 InspectorEvaluateScriptEvent::data( 127 InspectorEvaluateScriptEvent::data(
128 frame(), source.url().getString(), source.startPosition())); 128 frame(), source.url().getString(), source.startPosition()));
129 probe::NativeBreakpoint nativeBreakpoint(frame()->document(),
130 "scriptFirstStatement");
131
132 v8::Local<v8::Value> result; 129 v8::Local<v8::Value> result;
133 { 130 {
134 V8CacheOptions v8CacheOptions = 131 V8CacheOptions v8CacheOptions =
135 cacheOptions(source.resource(), frame()->settings()); 132 cacheOptions(source.resource(), frame()->settings());
136 133
137 // Isolate exceptions that occur when compiling and executing 134 // Isolate exceptions that occur when compiling and executing
138 // the code. These exceptions should not interfere with 135 // the code. These exceptions should not interfere with
139 // javascript code we might evaluate from C++ when returning 136 // javascript code we might evaluate from C++ when returning
140 // from here. 137 // from here.
141 v8::TryCatch tryCatch(isolate()); 138 v8::TryCatch tryCatch(isolate());
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 for (size_t i = 0; i < resultArray->Length(); ++i) { 379 for (size_t i = 0; i < resultArray->Length(); ++i) {
383 v8::Local<v8::Value> value; 380 v8::Local<v8::Value> value;
384 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 381 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
385 return; 382 return;
386 results->push_back(value); 383 results->push_back(value);
387 } 384 }
388 } 385 }
389 } 386 }
390 387
391 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698