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

Unified Diff: src/api.cc

Issue 2667823004: Merged: [inspector] introduced memory size limit for console message storage (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index e6284965d0719aa3f2b9f6db327b34d8da8daf8b..8a954f15e653eff8420a7d1bbfd2554336b48e5f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9367,6 +9367,15 @@ void debug::SetAsyncTaskListener(Isolate* v8_isolate,
isolate->debug()->SetAsyncTaskListener(listener, data);
}
+int debug::EstimatedValueSize(Isolate* v8_isolate, v8::Local<v8::Value> value) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ ENTER_V8(isolate);
+ i::Handle<i::Object> object = Utils::OpenHandle(*value);
+ if (object->IsSmi()) return i::kPointerSize;
+ CHECK(object->IsHeapObject());
+ return i::Handle<i::HeapObject>::cast(object)->Size();
+}
+
Local<String> CpuProfileNode::GetFunctionName() const {
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
i::Isolate* isolate = node->isolate();
« 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