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

Side by Side Diff: src/api.cc

Issue 2653293003: [inspector] introduced memory size limit for console message storage (Closed)
Patch Set: addressed comments Created 3 years, 10 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-interface.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 9343 matching lines...) Expand 10 before | Expand all | Expand 10 after
9354 v8::Local<debug::Script> script) { 9354 v8::Local<debug::Script> script) {
9355 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); 9355 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9356 ENTER_V8(isolate); 9356 ENTER_V8(isolate);
9357 i::DisallowHeapAllocation no_gc; 9357 i::DisallowHeapAllocation no_gc;
9358 i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script)); 9358 i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script));
9359 while (i::SharedFunctionInfo* info = iter.Next()) { 9359 while (i::SharedFunctionInfo* info = iter.Next()) {
9360 info->set_computed_debug_is_blackboxed(false); 9360 info->set_computed_debug_is_blackboxed(false);
9361 } 9361 }
9362 } 9362 }
9363 9363
9364 int debug::EstimatedValueSize(Isolate* v8_isolate, v8::Local<v8::Value> value) {
9365 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9366 ENTER_V8(isolate);
9367 i::Handle<i::Object> object = Utils::OpenHandle(*value);
9368 if (object->IsSmi()) return i::kPointerSize;
9369 CHECK(object->IsHeapObject());
9370 return i::Handle<i::HeapObject>::cast(object)->Size();
9371 }
9372
9364 Local<String> CpuProfileNode::GetFunctionName() const { 9373 Local<String> CpuProfileNode::GetFunctionName() const {
9365 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 9374 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
9366 i::Isolate* isolate = node->isolate(); 9375 i::Isolate* isolate = node->isolate();
9367 const i::CodeEntry* entry = node->entry(); 9376 const i::CodeEntry* entry = node->entry();
9368 i::Handle<i::String> name = 9377 i::Handle<i::String> name =
9369 isolate->factory()->InternalizeUtf8String(entry->name()); 9378 isolate->factory()->InternalizeUtf8String(entry->name());
9370 if (!entry->has_name_prefix()) { 9379 if (!entry->has_name_prefix()) {
9371 return ToApiHandle<String>(name); 9380 return ToApiHandle<String>(name);
9372 } else { 9381 } else {
9373 // We do not expect this to fail. Change this if it does. 9382 // We do not expect this to fail. Change this if it does.
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
10046 Address callback_address = 10055 Address callback_address =
10047 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10056 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10048 VMState<EXTERNAL> state(isolate); 10057 VMState<EXTERNAL> state(isolate);
10049 ExternalCallbackScope call_scope(isolate, callback_address); 10058 ExternalCallbackScope call_scope(isolate, callback_address);
10050 callback(info); 10059 callback(info);
10051 } 10060 }
10052 10061
10053 10062
10054 } // namespace internal 10063 } // namespace internal
10055 } // namespace v8 10064 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698