summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge/c
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/bridge/c
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/bridge/c')
-rw-r--r--Source/WebCore/bridge/c/CRuntimeObject.cpp9
-rw-r--r--Source/WebCore/bridge/c/CRuntimeObject.h6
-rw-r--r--Source/WebCore/bridge/c/c_class.cpp1
-rw-r--r--Source/WebCore/bridge/c/c_instance.cpp12
-rw-r--r--Source/WebCore/bridge/c/c_runtime.cpp1
5 files changed, 23 insertions, 6 deletions
diff --git a/Source/WebCore/bridge/c/CRuntimeObject.cpp b/Source/WebCore/bridge/c/CRuntimeObject.cpp
index 4be4982..d322df4 100644
--- a/Source/WebCore/bridge/c/CRuntimeObject.cpp
+++ b/Source/WebCore/bridge/c/CRuntimeObject.cpp
@@ -24,11 +24,13 @@
*/
#include "config.h"
+#include "CRuntimeObject.h"
#if ENABLE(NETSCAPE_PLUGIN_API)
-#include "CRuntimeObject.h"
+#include "JSDOMBinding.h"
#include "c_instance.h"
+#include "runtime/ObjectPrototype.h"
namespace JSC {
namespace Bindings {
@@ -36,8 +38,11 @@ namespace Bindings {
const ClassInfo CRuntimeObject::s_info = { "CRuntimeObject", &RuntimeObject::s_info, 0, 0 };
CRuntimeObject::CRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<CInstance> instance)
- : RuntimeObject(exec, globalObject, instance)
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // We need to pass in the right global object for "i".
+ : RuntimeObject(exec, globalObject, WebCore::deprecatedGetDOMStructure<CRuntimeObject>(exec), instance)
{
+ ASSERT(inherits(&s_info));
}
CRuntimeObject::~CRuntimeObject()
diff --git a/Source/WebCore/bridge/c/CRuntimeObject.h b/Source/WebCore/bridge/c/CRuntimeObject.h
index bcd39d3..267d71e 100644
--- a/Source/WebCore/bridge/c/CRuntimeObject.h
+++ b/Source/WebCore/bridge/c/CRuntimeObject.h
@@ -44,8 +44,10 @@ public:
static const ClassInfo s_info;
-private:
- virtual const ClassInfo* classInfo() const { return &s_info; }
+ static PassRefPtr<Structure> createStructure(JSValue prototype)
+ {
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ }
};
}
diff --git a/Source/WebCore/bridge/c/c_class.cpp b/Source/WebCore/bridge/c/c_class.cpp
index f4ae5ca..a808946 100644
--- a/Source/WebCore/bridge/c/c_class.cpp
+++ b/Source/WebCore/bridge/c/c_class.cpp
@@ -32,6 +32,7 @@
#include "c_instance.h"
#include "c_runtime.h"
#include "npruntime_impl.h"
+#include <runtime/ScopeChain.h>
#include <runtime/Identifier.h>
#include <runtime/JSLock.h>
#include <wtf/text/StringHash.h>
diff --git a/Source/WebCore/bridge/c/c_instance.cpp b/Source/WebCore/bridge/c/c_instance.cpp
index f1dd4e5..27affeb 100644
--- a/Source/WebCore/bridge/c/c_instance.cpp
+++ b/Source/WebCore/bridge/c/c_instance.cpp
@@ -31,6 +31,7 @@
#include "CRuntimeObject.h"
#include "IdentifierRep.h"
+#include "JSDOMBinding.h"
#include "c_class.h"
#include "c_runtime.h"
#include "c_utility.h"
@@ -40,6 +41,7 @@
#include <interpreter/CallFrame.h>
#include <runtime/ArgList.h>
#include <runtime/Error.h>
+#include <runtime/FunctionPrototype.h>
#include <runtime/JSLock.h>
#include <runtime/JSNumberCell.h>
#include <runtime/PropertyNameArray.h>
@@ -111,11 +113,17 @@ bool CInstance::supportsInvokeDefaultMethod() const
class CRuntimeMethod : public RuntimeMethod {
public:
CRuntimeMethod(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<CRuntimeMethod>(exec), name, list)
{
+ ASSERT(inherits(&s_info));
}
- virtual const ClassInfo* classInfo() const { return &s_info; }
+ static PassRefPtr<Structure> createStructure(JSValue prototype)
+ {
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ }
static const ClassInfo s_info;
};
diff --git a/Source/WebCore/bridge/c/c_runtime.cpp b/Source/WebCore/bridge/c/c_runtime.cpp
index e038cd4..f8c0dba 100644
--- a/Source/WebCore/bridge/c/c_runtime.cpp
+++ b/Source/WebCore/bridge/c/c_runtime.cpp
@@ -32,6 +32,7 @@
#include "c_instance.h"
#include "c_utility.h"
#include "npruntime_impl.h"
+#include <runtime/ScopeChain.h>
#include <runtime/JSLock.h>
namespace JSC {