From 81bc750723a18f21cd17d1b173cd2a4dda9cea6e Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 24 May 2011 11:24:40 +0100 Subject: Merge WebKit at r80534: Intial merge by Git Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61 --- Source/WebCore/bridge/objc/objc_instance.mm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source/WebCore/bridge/objc/objc_instance.mm') diff --git a/Source/WebCore/bridge/objc/objc_instance.mm b/Source/WebCore/bridge/objc/objc_instance.mm index ae9d95d..e0b18f1 100644 --- a/Source/WebCore/bridge/objc/objc_instance.mm +++ b/Source/WebCore/bridge/objc/objc_instance.mm @@ -27,11 +27,13 @@ #import "objc_instance.h" #import "runtime_method.h" +#import "JSDOMBinding.h" #import "ObjCRuntimeObject.h" #import "WebScriptObject.h" #import #import #import +#import "runtime/FunctionPrototype.h" #import #ifdef NDEBUG @@ -175,11 +177,17 @@ bool ObjcInstance::supportsInvokeDefaultMethod() const class ObjCRuntimeMethod : public RuntimeMethod { public: ObjCRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list) - : RuntimeMethod(exec, globalObject, name, list) + // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object + // We need to pass in the right global object for "i". + : RuntimeMethod(exec, globalObject, WebCore::deprecatedGetDOMStructure(exec), name, list) { + ASSERT(inherits(&s_info)); } - virtual const ClassInfo* classInfo() const { return &s_info; } + static PassRefPtr createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } static const ClassInfo s_info; }; -- cgit v1.1