Title: [144661] trunk/Source/WebCore
- Revision
- 144661
- Author
- [email protected]
- Date
- 2013-03-04 13:02:07 -0800 (Mon, 04 Mar 2013)
Log Message
[v8] add isolate parameter to heap statistics calls
https://bugs.webkit.org/show_bug.cgi?id=111308
Patch by Dan Carney <[email protected]> on 2013-03-04
Reviewed by Jochen Eisinger.
No new tests.
* bindings/v8/ScriptGCEvent.cpp:
(WebCore::ScriptGCEvent::getHeapSize):
(WebCore::ScriptGCEvent::getUsedHeapSize):
* bindings/v8/V8AdaptorFunction.cpp:
(WebCore::V8AdaptorFunction::getTemplate):
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::checkMemoryUsage):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144660 => 144661)
--- trunk/Source/WebCore/ChangeLog 2013-03-04 20:42:13 UTC (rev 144660)
+++ trunk/Source/WebCore/ChangeLog 2013-03-04 21:02:07 UTC (rev 144661)
@@ -1,3 +1,20 @@
+2013-03-04 Dan Carney <[email protected]>
+
+ [v8] add isolate parameter to heap statistics calls
+ https://bugs.webkit.org/show_bug.cgi?id=111308
+
+ Reviewed by Jochen Eisinger.
+
+ No new tests.
+
+ * bindings/v8/ScriptGCEvent.cpp:
+ (WebCore::ScriptGCEvent::getHeapSize):
+ (WebCore::ScriptGCEvent::getUsedHeapSize):
+ * bindings/v8/V8AdaptorFunction.cpp:
+ (WebCore::V8AdaptorFunction::getTemplate):
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::V8GCController::checkMemoryUsage):
+
2013-03-04 Jochen Eisinger <[email protected]>
[chromium] remove deprecated hyphenation methods from Platform
Modified: trunk/Source/WebCore/bindings/v8/ScriptGCEvent.cpp (144660 => 144661)
--- trunk/Source/WebCore/bindings/v8/ScriptGCEvent.cpp 2013-03-04 20:42:13 UTC (rev 144660)
+++ trunk/Source/WebCore/bindings/v8/ScriptGCEvent.cpp 2013-03-04 21:02:07 UTC (rev 144661)
@@ -74,7 +74,7 @@
void ScriptGCEvent::getHeapSize(HeapInfo& info)
{
v8::HeapStatistics heapStatistics;
- v8::V8::GetHeapStatistics(&heapStatistics);
+ v8::Isolate::GetCurrent()->GetHeapStatistics(&heapStatistics);
info.usedJSHeapSize = heapStatistics.used_heap_size();
info.totalJSHeapSize = heapStatistics.total_physical_size();
info.jsHeapSizeLimit = heapStatistics.heap_size_limit();
@@ -83,7 +83,7 @@
size_t ScriptGCEvent::getUsedHeapSize()
{
v8::HeapStatistics heapStatistics;
- v8::V8::GetHeapStatistics(&heapStatistics);
+ v8::Isolate::GetCurrent()->GetHeapStatistics(&heapStatistics);
return heapStatistics.used_heap_size();
}
Modified: trunk/Source/WebCore/bindings/v8/V8AdaptorFunction.cpp (144660 => 144661)
--- trunk/Source/WebCore/bindings/v8/V8AdaptorFunction.cpp 2013-03-04 20:42:13 UTC (rev 144660)
+++ trunk/Source/WebCore/bindings/v8/V8AdaptorFunction.cpp 2013-03-04 21:02:07 UTC (rev 144661)
@@ -48,7 +48,7 @@
if (result != data->rawTemplateMap().end())
return result->value;
// The lifetime is of newTemplate is delegated to the TemplateMap thus this won't be leaked.
- v8::Persistent<v8::FunctionTemplate> newTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New());
+ v8::Persistent<v8::FunctionTemplate> newTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New());
data->rawTemplateMap().add(&info, configureTemplate(newTemplate));
return newTemplate;
}
Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (144660 => 144661)
--- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-03-04 20:42:13 UTC (rev 144660)
+++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-03-04 21:02:07 UTC (rev 144661)
@@ -439,7 +439,7 @@
// Memory usage is large and doubled since the last GC.
// Check if we need to send low memory notification.
v8::HeapStatistics heapStatistics;
- v8::V8::GetHeapStatistics(&heapStatistics);
+ v8::Isolate::GetCurrent()->GetHeapStatistics(&heapStatistics);
int heapSizeMB = heapStatistics.total_heap_size() >> 20;
// Do not send low memory notification if V8 heap size is more than 7/8
// of total memory usage. Let V8 to schedule GC itself in this case.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes