Title: [121047] trunk/Source/WebCore
- Revision
- 121047
- Author
- [email protected]
- Date
- 2012-06-22 11:55:02 -0700 (Fri, 22 Jun 2012)
Log Message
[V8] Clean up visitDOMWrapper code
https://bugs.webkit.org/show_bug.cgi?id=89774
Reviewed by Tony Chang.
This moves the check if domWrapperVisitorFunction is null into a function of the WrapperTypeInfo struct.
This is so that users of WrapperTypeInfo does not need to know about the inner details of the struct.
It also makes things more consistent since the other fields in the struct have these kind of functions.
This is a follow up change to http://trac.webkit.org/changeset/120854.
No new tests. Covered by existing tests.
* bindings/v8/V8GCController.cpp:
(WebCore::GrouperVisitor::visitDOMWrapper): Call WrapperTypeInfo::visitDOMWrapper instead.
* bindings/v8/WrapperTypeInfo.h:
(WrapperTypeInfo):
(WebCore::WrapperTypeInfo::visitDOMWrapper): If domWrapperVisitorFunction is non null call it.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121046 => 121047)
--- trunk/Source/WebCore/ChangeLog 2012-06-22 18:47:56 UTC (rev 121046)
+++ trunk/Source/WebCore/ChangeLog 2012-06-22 18:55:02 UTC (rev 121047)
@@ -1,3 +1,24 @@
+2012-06-22 Erik Arvidsson <[email protected]>
+
+ [V8] Clean up visitDOMWrapper code
+ https://bugs.webkit.org/show_bug.cgi?id=89774
+
+ Reviewed by Tony Chang.
+
+ This moves the check if domWrapperVisitorFunction is null into a function of the WrapperTypeInfo struct.
+ This is so that users of WrapperTypeInfo does not need to know about the inner details of the struct.
+ It also makes things more consistent since the other fields in the struct have these kind of functions.
+
+ This is a follow up change to http://trac.webkit.org/changeset/120854.
+
+ No new tests. Covered by existing tests.
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::GrouperVisitor::visitDOMWrapper): Call WrapperTypeInfo::visitDOMWrapper instead.
+ * bindings/v8/WrapperTypeInfo.h:
+ (WrapperTypeInfo):
+ (WebCore::WrapperTypeInfo::visitDOMWrapper): If domWrapperVisitorFunction is non null call it.
+
2012-06-22 Jan Keromnes <[email protected]>
Web Inspector: ExtensionPanel.onSearch listener doesn't work
Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (121046 => 121047)
--- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2012-06-22 18:47:56 UTC (rev 121046)
+++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2012-06-22 18:55:02 UTC (rev 121047)
@@ -341,8 +341,7 @@
void visitDOMWrapper(DOMDataStore* store, void* object, v8::Persistent<v8::Object> wrapper)
{
WrapperTypeInfo* info = V8DOMWrapper::domWrapperType(wrapper);
- if (info->domWrapperVisitorFunction)
- info->domWrapperVisitorFunction(store, object, wrapper);
+ info->visitDOMWrapper(store, object, wrapper);
}
void applyGrouping()
Modified: trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h (121046 => 121047)
--- trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h 2012-06-22 18:47:56 UTC (rev 121046)
+++ trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h 2012-06-22 18:55:02 UTC (rev 121047)
@@ -94,7 +94,13 @@
return 0;
return toActiveDOMObjectFunction(object);
}
-
+
+ void visitDOMWrapper(DOMDataStore* store, void* object, v8::Persistent<v8::Object> wrapper)
+ {
+ if (domWrapperVisitorFunction)
+ domWrapperVisitorFunction(store, object, wrapper);
+ }
+
const GetTemplateFunction getTemplateFunction;
const DerefObjectFunction derefObjectFunction;
const ToActiveDOMObjectFunction toActiveDOMObjectFunction;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes