OSDN Git Service

Merge WebKit at r84325: Initial merge by git.
[android-x86/external-webkit.git] / Source / JavaScriptCore / interpreter / RegisterFile.cpp
index b3a87e5..e3b34bb 100644 (file)
@@ -29,7 +29,7 @@
 #include "config.h"
 #include "RegisterFile.h"
 
-#include "ConservativeSet.h"
+#include "ConservativeRoots.h"
 #include "Interpreter.h"
 #include "JSGlobalData.h"
 #include "JSGlobalObject.h"
@@ -72,24 +72,7 @@ void RegisterFile::releaseExcessCapacity()
 
 void RegisterFile::setGlobalObject(JSGlobalObject* globalObject)
 {
-    m_globalObject.set(globalObject->globalData(), globalObject, RegisterFile::globalObjectCollectedNotifier());
-}
-
-class GlobalObjectNotifier : public Finalizer {
-public:
-    void finalize(Handle<Unknown> value, void*)
-    {
-        JSGlobalObject* globalObject = asGlobalObject(value.get());
-        globalObject->globalData().interpreter->registerFile().setNumGlobals(0);
-    }
-};
-
-Finalizer* RegisterFile::globalObjectCollectedNotifier()
-{
-    // This will leak alas, but we only create one of them, and it doesn't
-    // take up any significant amount of space.
-    static GlobalObjectNotifier* notifier = new GlobalObjectNotifier;
-    return notifier;
+    m_globalObject.set(globalObject->globalData(), globalObject, &m_globalObjectOwner, this);
 }
 
 JSGlobalObject* RegisterFile::globalObject()