[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
oliver at apple.com
oliver at apple.com
Thu Feb 4 21:31:49 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit b419f81562f57da2716aebaaf2cef9a86b952301
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 29 04:00:11 2010 +0000
2010-01-28 Oliver Hunt <oliver at apple.com>
Reviewed by Gavin Barraclough.
DOM Objects shouldn't all require custom mark functions
https://bugs.webkit.org/show_bug.cgi?id=34291
Make getAnonymousValue const-friendly
* runtime/JSObject.h:
(JSC::JSObject::getAnonymousValue):
2010-01-28 Steve Block <steveblock at google.com>
Reviewed by David Levin.
Use long long rather than int64 in V8Binding.h
https://bugs.webkit.org/show_bug.cgi?id=34270
No new tests, build fix only.
* bindings/v8/V8Binding.h: Modified.
(WebCore::toInt64): Returns long long
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 0fbf8b4..96eec77 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by Gavin Barraclough.
+ DOM Objects shouldn't all require custom mark functions
+ https://bugs.webkit.org/show_bug.cgi?id=34291
+
+ Make getAnonymousValue const-friendly
+
+ * runtime/JSObject.h:
+ (JSC::JSObject::getAnonymousValue):
+
+2010-01-28 Oliver Hunt <oliver at apple.com>
+
+ Reviewed by Gavin Barraclough.
+
Simplify anonymous slot implementation
https://bugs.webkit.org/show_bug.cgi?id=34282
diff --git a/JavaScriptCore/runtime/JSObject.h b/JavaScriptCore/runtime/JSObject.h
index 414e0e8..2b31a65 100644
--- a/JavaScriptCore/runtime/JSObject.h
+++ b/JavaScriptCore/runtime/JSObject.h
@@ -222,7 +222,7 @@ namespace JSC {
ASSERT(index < m_structure->anonymousSlotCount());
*locationForOffset(index) = value;
}
- JSValue getAnonymousValue(unsigned index)
+ JSValue getAnonymousValue(unsigned index) const
{
ASSERT(index < m_structure->anonymousSlotCount());
return *locationForOffset(index);
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 41b9095..80ad831 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -142,6 +142,21 @@
Reviewed by Gavin Barraclough.
+ DOM Objects shouldn't all require custom mark functions
+ https://bugs.webkit.org/show_bug.cgi?id=34291
+
+ Make DOMObjectWithGlobalPointer use an anonymous slot to store the global object
+ reference.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::globalObject):
+ (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
+ (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
+
+2010-01-28 Oliver Hunt <oliver at apple.com>
+
+ Reviewed by Gavin Barraclough.
+
Simplify anonymous slot implementation
https://bugs.webkit.org/show_bug.cgi?id=34282
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h
index 1e78847..5456c75 100644
--- a/WebCore/bindings/js/JSDOMBinding.h
+++ b/WebCore/bindings/js/JSDOMBinding.h
@@ -71,12 +71,12 @@ namespace WebCore {
// updated to store a globalObject pointer.
class DOMObjectWithGlobalPointer : public DOMObject {
public:
- JSDOMGlobalObject* globalObject() const { return m_globalObject; }
+ JSDOMGlobalObject* globalObject() const { return static_cast<JSDOMGlobalObject*>(getAnonymousValue(GlobalObjectSlot).asCell()); }
ScriptExecutionContext* scriptExecutionContext() const
{
// FIXME: Should never be 0, but can be due to bug 27640.
- return m_globalObject->scriptExecutionContext();
+ return globalObject()->scriptExecutionContext();
}
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
@@ -85,27 +85,19 @@ namespace WebCore {
}
protected:
- static const unsigned StructureFlags = JSC::OverridesMarkChildren | DOMObject::StructureFlags;
+ static const unsigned AnonymousSlotCount = 1 + DOMObject::AnonymousSlotCount;
+ static const unsigned GlobalObjectSlot = AnonymousSlotCount - 1;
DOMObjectWithGlobalPointer(NonNullPassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject)
: DOMObject(structure)
- , m_globalObject(globalObject)
{
// FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
// new JavaScript objects on detached windows due to DOMWindow::document()
// needing to reach through the frame to get to the Document*. See bug 27640.
// ASSERT(globalObject->scriptExecutionContext());
+ putAnonymousValue(GlobalObjectSlot, globalObject);
}
virtual ~DOMObjectWithGlobalPointer() { }
-
- void markChildren(JSC::MarkStack& markStack)
- {
- DOMObject::markChildren(markStack);
- markStack.append(m_globalObject);
- }
-
- private:
- JSDOMGlobalObject* m_globalObject;
};
// Base class for all constructor objects in the JSC bindings.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list