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

Side by Side Diff: src/api.cc

Issue 2623313005: [inspector] introduced debug::SetAsyncTaskListener (Closed)
Patch Set: added missing header Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 9290 matching lines...) Expand 10 before | Expand all | Expand 10 after
9301 result = i::Compiler::GetSharedFunctionInfoForScript( 9301 result = i::Compiler::GetSharedFunctionInfoForScript(
9302 str, i::Handle<i::Object>(), 0, 0, origin_options, 9302 str, i::Handle<i::Object>(), 0, 0, origin_options,
9303 i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data, 9303 i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data,
9304 ScriptCompiler::kNoCompileOptions, i::INSPECTOR_CODE, false); 9304 ScriptCompiler::kNoCompileOptions, i::INSPECTOR_CODE, false);
9305 has_pending_exception = result.is_null(); 9305 has_pending_exception = result.is_null();
9306 RETURN_ON_FAILED_EXECUTION(UnboundScript); 9306 RETURN_ON_FAILED_EXECUTION(UnboundScript);
9307 } 9307 }
9308 RETURN_ESCAPED(ToApiHandle<UnboundScript>(result)); 9308 RETURN_ESCAPED(ToApiHandle<UnboundScript>(result));
9309 } 9309 }
9310 9310
9311 void debug::SetAsyncTaskListener(Isolate* v8_isolate,
9312 debug::AsyncTaskListener listener,
9313 void* data) {
9314 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9315 ENTER_V8(isolate);
9316 isolate->debug()->SetAsyncTaskListener(listener, data);
9317 }
9318
9311 Local<String> CpuProfileNode::GetFunctionName() const { 9319 Local<String> CpuProfileNode::GetFunctionName() const {
9312 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 9320 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
9313 i::Isolate* isolate = node->isolate(); 9321 i::Isolate* isolate = node->isolate();
9314 const i::CodeEntry* entry = node->entry(); 9322 const i::CodeEntry* entry = node->entry();
9315 i::Handle<i::String> name = 9323 i::Handle<i::String> name =
9316 isolate->factory()->InternalizeUtf8String(entry->name()); 9324 isolate->factory()->InternalizeUtf8String(entry->name());
9317 if (!entry->has_name_prefix()) { 9325 if (!entry->has_name_prefix()) {
9318 return ToApiHandle<String>(name); 9326 return ToApiHandle<String>(name);
9319 } else { 9327 } else {
9320 // We do not expect this to fail. Change this if it does. 9328 // We do not expect this to fail. Change this if it does.
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
9988 Address callback_address = 9996 Address callback_address =
9989 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9997 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9990 VMState<EXTERNAL> state(isolate); 9998 VMState<EXTERNAL> state(isolate);
9991 ExternalCallbackScope call_scope(isolate, callback_address); 9999 ExternalCallbackScope call_scope(isolate, callback_address);
9992 callback(info); 10000 callback(info);
9993 } 10001 }
9994 10002
9995 10003
9996 } // namespace internal 10004 } // namespace internal
9997 } // namespace v8 10005 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698