[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
mjs at apple.com
mjs at apple.com
Fri Feb 26 22:27:00 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 82cb15ce5e4d15115f35ebe254b1d3d1314cf2ed
Author: mjs at apple.com <mjs at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Feb 22 10:31:47 2010 +0000
Not reviewed, build fix.
Revert the previous change.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index de8055f..584d39a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-22 Maciej Stachowiak <mjs at apple.com>
+
+ Not reviewed, build fix.
+
+ Revert the previous change.
+
2010-02-21 Maciej Stachowiak <mjs at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index e28e348..3aecf9b 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -437,7 +437,6 @@ webcore_sources += \
WebCore/bindings/js/JSNamedNodeMapCustom.cpp \
WebCore/bindings/js/JSNavigatorCustom.cpp \
WebCore/bindings/js/JSNodeCustom.cpp \
- WebCore/bindings/js/JSNodeCustom.h \
WebCore/bindings/js/JSNodeFilterCondition.cpp \
WebCore/bindings/js/JSNodeFilterCondition.h \
WebCore/bindings/js/JSNodeFilterCustom.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index d6f2f5e..6fe815c 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -568,7 +568,6 @@
'bindings/js/JSNamedNodesCollection.h',
'bindings/js/JSNavigatorCustom.cpp',
'bindings/js/JSNodeCustom.cpp',
- 'bindings/js/JSNodeCustom.h',
'bindings/js/JSNodeFilterCondition.cpp',
'bindings/js/JSNodeFilterCondition.h',
'bindings/js/JSNodeFilterCustom.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index badef2e..2e8e47e 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1018,7 +1018,6 @@ HEADERS += \
bindings/js/JSLazyEventListener.h \
bindings/js/JSLocationCustom.h \
bindings/js/JSMessageChannelConstructor.h \
- bindings/js/JSNodeCustom.h \
bindings/js/JSNodeFilterCondition.h \
bindings/js/JSOptionConstructor.h \
bindings/js/JSPluginElementFunctions.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 20eaa75..44ea351 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -38080,10 +38080,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeCustom.h"
- >
- </File>
- <File
RelativePath="..\bindings\js\JSNodeFilterCondition.cpp"
>
<FileConfiguration
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index 0efee81..abba405 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -221,6 +221,11 @@ const JSC::HashTable* getHashTableForGlobalData(JSGlobalData& globalData, const
return DOMObjectHashTableMap::mapFor(globalData).get(staticTable);
}
+static inline DOMObjectWrapperMap& DOMObjectWrapperMapFor(JSC::ExecState* exec)
+{
+ return currentWorld(exec)->m_wrappers;
+}
+
bool hasCachedDOMObjectWrapperUnchecked(JSGlobalData* globalData, void* objectHandle)
{
for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
@@ -241,13 +246,13 @@ bool hasCachedDOMObjectWrapper(JSGlobalData* globalData, void* objectHandle)
DOMObject* getCachedDOMObjectWrapper(JSC::ExecState* exec, void* objectHandle)
{
- return domObjectWrapperMapFor(exec).get(objectHandle);
+ return DOMObjectWrapperMapFor(exec).get(objectHandle);
}
void cacheDOMObjectWrapper(JSC::ExecState* exec, void* objectHandle, DOMObject* wrapper)
{
willCacheWrapper(wrapper);
- domObjectWrapperMapFor(exec).set(objectHandle, wrapper);
+ DOMObjectWrapperMapFor(exec).set(objectHandle, wrapper);
}
bool hasCachedDOMNodeWrapperUnchecked(Document* document, Node* node)
@@ -263,6 +268,13 @@ bool hasCachedDOMNodeWrapperUnchecked(Document* document, Node* node)
return false;
}
+JSNode* getCachedDOMNodeWrapper(JSC::ExecState* exec, Document* document, Node* node)
+{
+ if (document)
+ return document->getWrapperCache(currentWorld(exec))->get(node);
+ return static_cast<JSNode*>(DOMObjectWrapperMapFor(exec).get(node));
+}
+
void forgetDOMObject(DOMObject* wrapper, void* objectHandle)
{
JSC::JSGlobalData* globalData = Heap::heap(wrapper)->globalData();
@@ -291,9 +303,6 @@ void forgetDOMNode(JSNode* wrapper, Node* node, Document* document)
forgetDOMObject(wrapper, node);
return;
}
-
- if (node->wrapper() == wrapper)
- node->clearWrapper();
// We can't guarantee that a wrapper is in the cache when it uncaches itself,
// since a new wrapper may be cached before the old wrapper's destructor runs.
@@ -307,15 +316,13 @@ void forgetDOMNode(JSNode* wrapper, Node* node, Document* document)
void cacheDOMNodeWrapper(JSC::ExecState* exec, Document* document, Node* node, JSNode* wrapper)
{
+ if (!document) {
+ willCacheWrapper(wrapper);
+ DOMObjectWrapperMapFor(exec).set(node, wrapper);
+ return;
+ }
willCacheWrapper(wrapper);
-
- if (!document)
- domObjectWrapperMapFor(exec).set(node, wrapper);
- else
- document->getWrapperCache(currentWorld(exec))->set(node, wrapper);
-
- if (currentWorld(exec)->isNormal())
- node->setWrapper(wrapper);
+ document->getWrapperCache(currentWorld(exec))->set(node, wrapper);
}
void forgetAllDOMNodesForDocument(Document* document)
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h
index 720888d..807bf82 100644
--- a/WebCore/bindings/js/JSDOMBinding.h
+++ b/WebCore/bindings/js/JSDOMBinding.h
@@ -235,7 +235,7 @@ namespace WebCore {
void forgetDOMNode(JSNode* wrapper, Node* node, Document* document);
void forgetDOMObject(DOMObject* wrapper, void* objectHandle);
- JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Node*);
+ JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Document*, Node*);
void cacheDOMNodeWrapper(JSC::ExecState*, Document*, Node*, JSNode* wrapper);
void forgetAllDOMNodesForDocument(Document*);
void forgetWorldOfDOMNodesForDocument(Document*, DOMWrapperWorld*);
@@ -446,11 +446,6 @@ namespace WebCore {
return jsStringSlowCase(exec, stringCache, stringImpl);
}
- inline DOMObjectWrapperMap& domObjectWrapperMapFor(JSC::ExecState* exec)
- {
- return currentWorld(exec)->m_wrappers;
- }
-
} // namespace WebCore
#endif // JSDOMBinding_h
diff --git a/WebCore/bindings/js/JSDocumentCustom.cpp b/WebCore/bindings/js/JSDocumentCustom.cpp
index 6942f03..eda153e 100644
--- a/WebCore/bindings/js/JSDocumentCustom.cpp
+++ b/WebCore/bindings/js/JSDocumentCustom.cpp
@@ -96,7 +96,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen
if (!document)
return jsNull();
- DOMObject* wrapper = getCachedDOMNodeWrapper(exec, document);
+ DOMObject* wrapper = getCachedDOMNodeWrapper(exec, document, document);
if (wrapper)
return wrapper;
diff --git a/WebCore/bindings/js/JSNodeCustom.cpp b/WebCore/bindings/js/JSNodeCustom.cpp
index 134c581..46a30a4 100644
--- a/WebCore/bindings/js/JSNodeCustom.cpp
+++ b/WebCore/bindings/js/JSNodeCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -172,7 +172,7 @@ void JSNode::markChildren(MarkStack& markStack)
markDOMNodeWrapper(markStack, m_impl->document(), nodeToMark);
}
-static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
+static ALWAYS_INLINE JSValue createWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
{
ASSERT(node);
ASSERT(!getCachedDOMNodeWrapper(exec, node->document(), node));
@@ -228,18 +228,25 @@ static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObj
return wrapper;
}
-
-JSValue createWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
-{
- return createWrapperInline(exec, globalObject, node);
-}
JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
{
if (!node)
return jsNull();
- return createWrapperInline(exec, globalObject, node);
+ return createWrapper(exec, globalObject, node);
+}
+
+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
+{
+ if (!node)
+ return jsNull();
+
+ JSNode* wrapper = getCachedDOMNodeWrapper(exec, node->document(), node);
+ if (wrapper)
+ return wrapper;
+
+ return createWrapper(exec, globalObject, node);
}
} // namespace WebCore
diff --git a/WebCore/bindings/js/JSNodeCustom.h b/WebCore/bindings/js/JSNodeCustom.h
deleted file mode 100644
index 2534692..0000000
--- a/WebCore/bindings/js/JSNodeCustom.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JSNodeCustom_h
-#define JSNodeCustom_h
-
-#include "JSDOMBinding.h"
-#include <wtf/AlwaysInline.h>
-
-namespace WebCore {
-
-inline JSNode* getCachedDOMNodeWrapper(JSC::ExecState* exec, Node* node)
-{
- if (currentWorld(exec)->isNormal())
- return static_cast<JSNode*>(node->wrapper());
- return static_cast<JSNode*>(domObjectWrapperMapFor(exec).get(node));
-}
-
-JSC::JSValue createWrapper(JSC::ExecState*, JSDOMGlobalObject*, Node*);
-
-inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
-{
- if (!node)
- return JSC::jsNull();
-
- JSNode* wrapper = getCachedDOMNodeWrapper(exec, node);
- if (wrapper)
- return wrapper;
-
- return createWrapper(exec, globalObject, node);
-}
-
-}
-
-#endif // JSDOMNodeCustom_h
diff --git a/WebCore/bindings/js/ScriptWrappable.h b/WebCore/bindings/js/ScriptWrappable.h
index 7950cf3..d70cab7 100644
--- a/WebCore/bindings/js/ScriptWrappable.h
+++ b/WebCore/bindings/js/ScriptWrappable.h
@@ -33,27 +33,9 @@
namespace WebCore {
-class DOMObject;
-
class ScriptWrappable {
public:
- ScriptWrappable() : m_wrapper() { }
-
- DOMObject* wrapper() const
- {
- return m_wrapper;
- }
-
- void setWrapper(DOMObject* wrapper)
- {
- ASSERT(wrapper);
- m_wrapper = wrapper;
- }
-
- void clearWrapper() { m_wrapper = 0; }
-
-private:
- DOMObject* m_wrapper;
+ ScriptWrappable() { }
};
} // namespace WebCore
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index ece6df2..94fc2b8 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -32,7 +32,6 @@ my $writeDependencies = 0;
my @headerContentHeader = ();
my @headerContent = ();
my %headerIncludes = ();
-my %headerTrailingIncludes = ();
my @implContentHeader = ();
my @implContent = ();
@@ -552,9 +551,7 @@ sub GenerateHeader
# Prototype
push(@headerContent, " static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);\n") unless ($dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"});
- $headerTrailingIncludes{"${className}Custom.h"} = 1 if $dataNode->extendedAttributes->{"CustomHeader"};
-
- $implIncludes{"${className}Custom.h"} = 1 if !$dataNode->extendedAttributes->{"CustomHeader"} && ($dataNode->extendedAttributes->{"CustomPutFunction"} || $dataNode->extendedAttributes->{"DelegatingPutFunction"});
+ $implIncludes{"${className}Custom.h"} = 1 if $dataNode->extendedAttributes->{"CustomHeader"} || $dataNode->extendedAttributes->{"CustomPutFunction"} || $dataNode->extendedAttributes->{"DelegatingPutFunction"};
my $hasGetter = $numAttributes > 0
|| !($dataNode->extendedAttributes->{"OmitConstructor"}
@@ -2249,23 +2246,12 @@ sub WriteData
}
print $HEADER @headerContent;
-
- @includes = ();
- foreach my $include (keys %headerTrailingIncludes) {
- $include = "\"$include\"" unless $include =~ /^["<]/; # "
- push @includes, $include;
- }
- foreach my $include (sort @includes) {
- print $HEADER "#include $include\n";
- }
-
close($HEADER);
undef($HEADER);
@headerContentHeader = ();
@headerContent = ();
%headerIncludes = ();
- %headerTrailingIncludes = ();
}
if (defined($DEPS)) {
diff --git a/WebCore/dom/Node.idl b/WebCore/dom/Node.idl
index a2b2455..c6cd4b9 100644
--- a/WebCore/dom/Node.idl
+++ b/WebCore/dom/Node.idl
@@ -21,7 +21,6 @@
module core {
interface [
- CustomHeader,
CustomMarkFunction,
CustomPushEventHandlerScope,
CustomToJS,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list