Crash re-entering Document layout with frame flattening enabled
https://bugs.webkit.org/show_bug.cgi?id=97841

Reviewed by Brady Eidson.

When creating a CachedFrame, clearTimers on the Frame later; it has to
be done after documentWillSuspendForPageCache(), because the style
changes that HTMLPlugInImageElement::documentWillSuspendForPageCache()
do can schedule a layout on the FrameView, and we don't want this layout
timer to fire while the page is in the page cache.

Add an assertion in FrameView::layout() that the document is not in
the page cache. Without the above change, this would assert in
the plugins/frameset-with-plugin-frame.html test.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* page/FrameView.cpp:
(WebCore::FrameView::layout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix chromium build after http://trac.webkit.org/changeset/129964.
* WebCore.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix compilation of V8DependentRetained and JSDependentRetained.
https://bugs.webkit.org/show_bug.cgi?id=97955

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-09-28
Reviewed by Kentaro Hara.

Fix bad usage of putDirect and removeDirect from JSDependentRetained and fix
incorrect assumptions about how weak handles work in V8. This is refactored
out of the patch on http://wkbug.com/93661

No tests needed, this just fixes the compile and wrong usage of ScopedPersistent.

* bindings/js/JSDependentRetained.h:
(WebCore::JSDependentRetained::JSDependentRetained):
(WebCore::JSDependentRetained::retain):
(WebCore::JSDependentRetained::release):
(JSDependentRetained):
* bindings/v8/V8DependentRetained.h:
(WebCore::V8DependentRetained::V8DependentRetained):
(WebCore::V8DependentRetained::retain):
(WebCore::V8DependentRetained::weakCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove support for method overloading from bridge code
https://bugs.webkit.org/show_bug.cgi?id=97959

Reviewed by Dan Bernstein.

Source/WebCore:

The method overloading handling was only in place for the (now removed) Java bridge.
Replace MethodList everywhere with a single Method pointer.

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.exp.in:
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
* bridge/c/c_class.h:
(CClass):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::create):
(JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
(JSC::Bindings::CInstance::getMethod):
(JSC::Bindings::CInstance::invokeMethod):
* bridge/jsc/BridgeJSC.h:
(Bindings):
(Class):
* bridge/objc/objc_class.h:
(ObjcClass):
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::create):
(ObjCRuntimeMethod::ObjCRuntimeMethod):
(ObjcInstance::invokeMethod):
* bridge/qt/qt_class.cpp:
(JSC::Bindings::QtClass::methodNamed):
* bridge/qt/qt_class.h:
(QtClass):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::getMethod):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::RuntimeMethod):
(JSC::RuntimeMethod::lengthGetter):
(JSC::callRuntimeMethod):
* bridge/runtime_method.h:
(JSC::RuntimeMethod::create):
(JSC::RuntimeMethod::method):
(RuntimeMethod):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertySlot):
(JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):

Source/WebKit/mac:

Update for WebCore changes; MethodList has been replaced with a single Method* everywhere.

* Plugins/Hosted/ProxyInstance.h:
(ProxyInstance):
* Plugins/Hosted/ProxyInstance.mm:
(ProxyClass):
(WebKit::ProxyClass::methodNamed):
(WebKit::ProxyRuntimeMethod::create):
(WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
(WebKit::ProxyInstance::getMethod):
(WebKit::ProxyInstance::invokeMethod):
(WebKit::ProxyInstance::methodNamed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow any kind of v8::Handle in invokeCallback instead of requiring a v8::Persistent.
https://bugs.webkit.org/show_bug.cgi?id=97956

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-09-28
Reviewed by Adam Barth.

Use v8::Handle instead of v8::Persistent for the callback argument on invokeCallback.
There doesn't seem to be any reason for requiring a Persistent, and it makes it harder
to use this API.

This is factored out of http://wkbug.com/93661

No new tests, this is functionally equivalent.

* bindings/v8/V8Callback.cpp:
(WebCore::invokeCallback):
* bindings/v8/V8Callback.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129970 268f45cc-cd09-0410-ab3c-d52691b4dbfc