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

Side by Side Diff: src/api.cc

Issue 2653293003: [inspector] introduced memory size limit for console message storage (Closed)
Patch Set: 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') | src/inspector/v8-console-message.cc » ('J')
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 9320 matching lines...) Expand 10 before | Expand all | Expand 10 after
9331 v8::Local<debug::Script> script) { 9331 v8::Local<debug::Script> script) {
9332 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); 9332 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9333 ENTER_V8(isolate); 9333 ENTER_V8(isolate);
9334 i::DisallowHeapAllocation no_gc; 9334 i::DisallowHeapAllocation no_gc;
9335 i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script)); 9335 i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script));
9336 while (i::SharedFunctionInfo* info = iter.Next()) { 9336 while (i::SharedFunctionInfo* info = iter.Next()) {
9337 info->set_computed_debug_is_blackboxed(false); 9337 info->set_computed_debug_is_blackboxed(false);
9338 } 9338 }
9339 } 9339 }
9340 9340
9341 int debug::ValueSize(Isolate* v8_isolate, v8::Local<v8::Value> value) {
9342 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9343 ENTER_V8(isolate);
9344 return i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*value))->Size();
9345 }
9346
9341 Local<String> CpuProfileNode::GetFunctionName() const { 9347 Local<String> CpuProfileNode::GetFunctionName() const {
9342 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 9348 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
9343 i::Isolate* isolate = node->isolate(); 9349 i::Isolate* isolate = node->isolate();
9344 const i::CodeEntry* entry = node->entry(); 9350 const i::CodeEntry* entry = node->entry();
9345 i::Handle<i::String> name = 9351 i::Handle<i::String> name =
9346 isolate->factory()->InternalizeUtf8String(entry->name()); 9352 isolate->factory()->InternalizeUtf8String(entry->name());
9347 if (!entry->has_name_prefix()) { 9353 if (!entry->has_name_prefix()) {
9348 return ToApiHandle<String>(name); 9354 return ToApiHandle<String>(name);
9349 } else { 9355 } else {
9350 // We do not expect this to fail. Change this if it does. 9356 // We do not expect this to fail. Change this if it does.
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
10023 Address callback_address = 10029 Address callback_address =
10024 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10030 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10025 VMState<EXTERNAL> state(isolate); 10031 VMState<EXTERNAL> state(isolate);
10026 ExternalCallbackScope call_scope(isolate, callback_address); 10032 ExternalCallbackScope call_scope(isolate, callback_address);
10027 callback(info); 10033 callback(info);
10028 } 10034 }
10029 10035
10030 10036
10031 } // namespace internal 10037 } // namespace internal
10032 } // namespace v8 10038 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | src/inspector/v8-console-message.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698