[v8] Stop using an IDL to generate V8MutationCallback
authoradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2013 21:03:20 +0000 (21:03 +0000)
committeradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2013 21:03:20 +0000 (21:03 +0000)
commitef2c3a658b612c2c4f82a6e5229d26138effc27b
tree66acabd577032830826cc0b76589cbe60cbd10a5
parent6aaaee3fdec1b127540e6381072606919b5a2860
[v8] Stop using an IDL to generate V8MutationCallback
https://bugs.webkit.org/show_bug.cgi?id=106122

Reviewed by Adam Barth.

The only real code in the generated V8MutationCallback.{h,cpp} files
were specifically written in CodeGeneratorV8 for its use. By instead
Using completely-hand-written versions of these files, the
CodeGenerator can be simplified (as can all generated Callbacks).
All the actually shared code is still shared via subclassing of
ActiveDOMCallback.

This introduces additional flexibility into the implementation of
MutationCallback which will be used when fixing the MutationObserver
memory leak (http://webkit.org/b/90661) for JSC.

No changes to JSC for now, just a FIXME in the IDL file.

No new tests, refactoringonly.

* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
* bindings/scripts/test/V8/V8TestCallback.cpp:
(WebCore::V8TestCallback::V8TestCallback):
* bindings/scripts/test/V8/V8TestCallback.h:
(WebCore::V8TestCallback::create):
(V8TestCallback):
* bindings/v8/V8MutationCallback.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp.
(WebCore::V8MutationCallback::V8MutationCallback):
(WebCore::V8MutationCallback::handleEvent):
* bindings/v8/V8MutationCallback.h: Added.
(V8MutationCallback):
(WebCore::V8MutationCallback::create):
(WebCore::V8MutationCallback::weakCallback):
* dom/MutationCallback.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
Source/WebCore/bindings/v8/V8MutationCallback.cpp [moved from Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp with 50% similarity]
Source/WebCore/bindings/v8/V8MutationCallback.h [new file with mode: 0644]
Source/WebCore/dom/MutationCallback.idl