Diff
Modified: trunk/Source/WebCore/ChangeLog (136814 => 136815)
--- trunk/Source/WebCore/ChangeLog 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/ChangeLog 2012-12-06 08:43:22 UTC (rev 136815)
@@ -1,5 +1,29 @@
2012-12-06 Kentaro Hara <[email protected]>
+ Remove JSDependentRetained.h and V8DependentRetained.h
+ https://bugs.webkit.org/show_bug.cgi?id=104232
+
+ Reviewed by Adam Barth.
+
+ Although (JS|V8)DependentRetained.h were introduced for MutationObservers,
+ they are not going to be used (See the discussion in bug 95519).
+ We can remove them.
+
+ No tests. No change in behavior.
+
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDependentRetained.h: Removed.
+ * bindings/v8/V8DependentRetained.h: Removed.
+ * bindings/v8/V8PerIsolateData.cpp:
+ (WebCore::V8PerIsolateData::V8PerIsolateData):
+ * bindings/v8/V8PerIsolateData.h:
+ (V8PerIsolateData):
+
+2012-12-06 Kentaro Hara <[email protected]>
+
[V8] Replace v8String("symbol") with v8::String::NewSymbol("symbol")
https://bugs.webkit.org/show_bug.cgi?id=104209
Modified: trunk/Source/WebCore/GNUmakefile.list.am (136814 => 136815)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-12-06 08:43:22 UTC (rev 136815)
@@ -2276,7 +2276,6 @@
Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \
Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp \
Source/WebCore/bindings/js/JSCustomXPathNSResolver.h \
- Source/WebCore/bindings/js/JSDependentRetained.h \
Source/WebCore/bindings/js/JSDictionary.cpp \
Source/WebCore/bindings/js/JSDictionary.h \
Source/WebCore/bindings/js/JSDOMBinding.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (136814 => 136815)
--- trunk/Source/WebCore/WebCore.gypi 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/WebCore.gypi 2012-12-06 08:43:22 UTC (rev 136815)
@@ -2290,7 +2290,6 @@
'bindings/v8/V8Callback.h',
'bindings/v8/V8Collection.cpp',
'bindings/v8/V8Collection.h',
- 'bindings/v8/V8DependentRetained.h',
'bindings/v8/V8DOMConfiguration.cpp',
'bindings/v8/V8DOMConfiguration.h',
'bindings/v8/V8DOMWindowShell.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (136814 => 136815)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-12-06 08:43:22 UTC (rev 136815)
@@ -66409,10 +66409,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSDependentRetained.h"
- >
- </File>
- <File
RelativePath="..\bindings\js\JSDesktopNotificationsCustom.cpp"
>
<FileConfiguration
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (136814 => 136815)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-12-06 08:43:22 UTC (rev 136815)
@@ -6647,7 +6647,6 @@
FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FF945ECA161F7F3600971BC8 /* PseudoElement.h */; };
FFD5B97A135CC97800D5E92A /* PageVisibilityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */; };
FFD5B97B135CC97800D5E92A /* PageVisibilityState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFD5B978135CC97800D5E92A /* PageVisibilityState.h */; settings = {ATTRIBUTES = (Private, ); }; };
- FFD86E7815F9583600047233 /* JSDependentRetained.h in Headers */ = {isa = PBXBuildFile; fileRef = FFD86E7715F9583600047233 /* JSDependentRetained.h */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -14195,7 +14194,6 @@
FF945ECA161F7F3600971BC8 /* PseudoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PseudoElement.h; sourceTree = "<group>"; };
FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageVisibilityState.cpp; sourceTree = "<group>"; };
FFD5B978135CC97800D5E92A /* PageVisibilityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageVisibilityState.h; sourceTree = "<group>"; };
- FFD86E7715F9583600047233 /* JSDependentRetained.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDependentRetained.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -20446,7 +20444,6 @@
C585A66111D4FAC5004C3E4B /* IDBBindingUtilities.h */,
1C81BA030E97348300266E07 /* _javascript_CallFrame.cpp */,
1C81BA040E97348300266E07 /* _javascript_CallFrame.h */,
- FFD86E7715F9583600047233 /* JSDependentRetained.h */,
BCE438A1140C0DBF005E437E /* JSDictionary.cpp */,
BCE4389B140B1BA7005E437E /* JSDictionary.h */,
93B70D4709EB0C7C009D8468 /* JSDOMBinding.cpp */,
@@ -24170,7 +24167,6 @@
2E97CE701293AD6B00C5C8FF /* JSDataView.h in Headers */,
4162A4581011464700DFF3ED /* JSDedicatedWorkerContext.h in Headers */,
FDA15ED212B03F94003A583A /* JSDelayNode.h in Headers */,
- FFD86E7815F9583600047233 /* JSDependentRetained.h in Headers */,
31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */,
59A86008119DAFA100DEF1EF /* JSDeviceOrientationEvent.h in Headers */,
BCE4389C140B1BA8005E437E /* JSDictionary.h in Headers */,
Deleted: trunk/Source/WebCore/bindings/js/JSDependentRetained.h (136814 => 136815)
--- trunk/Source/WebCore/bindings/js/JSDependentRetained.h 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/bindings/js/JSDependentRetained.h 2012-12-06 08:43:22 UTC (rev 136815)
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All Rights Reserved.
- * Copyright (C) 2005, 2006, 2007, 2008, 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
- * 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 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 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 JSDependentRetained_h
-#define JSDependentRetained_h
-
-#include "JSDOMGlobalObject.h"
-#include <heap/Weak.h>
-#include <runtime/JSObject.h>
-#include <runtime/PrivateName.h>
-#include <wtf/Forward.h>
-
-namespace WebCore {
-
-class JSDependentRetained {
-public:
- JSDependentRetained(JSC::JSObject* owner, JSC::JSObject* value, JSDOMGlobalObject* globalObject)
- : m_value(value)
- , m_globalObject(globalObject)
- {
- ASSERT(value);
- if (owner)
- retain(owner);
- }
-
- ~JSDependentRetained()
- {
- release();
- }
-
- JSC::JSObject* get() const
- {
- return m_value.get();
- }
-
- bool isEmpty() const
- {
- return !m_owner || !m_value;
- }
-
- void retain(JSC::JSObject* owner)
- {
- ASSERT(!m_owner && owner);
- ASSERT(m_value);
- m_owner = JSC::PassWeak<JSC::JSObject>(owner);
- m_owner->putDirect(m_globalObject->globalData(), m_propertyName, get());
- }
-
-private:
-
- void release()
- {
- if (m_owner)
- m_owner->removeDirect(m_globalObject->globalData(), m_propertyName);
- m_value.clear();
- m_owner.clear();
- }
-
- JSC::Weak<JSC::JSObject> m_owner;
- JSC::Weak<JSC::JSObject> m_value;
- JSC::PrivateName m_propertyName;
- JSC::Weak<JSDOMGlobalObject> m_globalObject;
-};
-
-} // namespace WebCore
-
-#endif // JSDependentRetained_h
Deleted: trunk/Source/WebCore/bindings/v8/V8DependentRetained.h (136814 => 136815)
--- trunk/Source/WebCore/bindings/v8/V8DependentRetained.h 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/bindings/v8/V8DependentRetained.h 2012-12-06 08:43:22 UTC (rev 136815)
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All Rights Reserved.
- * Copyright (C) 2005, 2006, 2007, 2008, 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
- * 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 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 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 V8DependentRetained_h
-#define V8DependentRetained_h
-
-#include "ScopedPersistent.h"
-#include "V8HiddenPropertyName.h"
-#include "V8PerIsolateData.h"
-#include <v8.h>
-#include <wtf/Forward.h>
-#include <wtf/UnusedParam.h>
-#include <wtf/dtoa.h>
-#include <wtf/text/StringBuilder.h>
-
-namespace WebCore {
-
-class V8DependentRetained {
-public:
- V8DependentRetained(v8::Handle<v8::Object> owner, v8::Handle<v8::Object> value)
- : m_value(value)
- , m_propertyName(createPropertyName())
- {
- ASSERT(!m_value.isEmpty());
- m_value.get().MakeWeak(this, &V8DependentRetained::weakCallback);
- if (!owner.IsEmpty())
- retain(owner);
- }
-
- ~V8DependentRetained()
- {
- release();
- }
-
- v8::Handle<v8::Object> get() const
- {
- return m_value.get();
- }
-
- bool isEmpty() const
- {
- return m_owner.isEmpty() || m_value.isEmpty();
- }
-
- void retain(v8::Handle<v8::Object> owner)
- {
- ASSERT(m_owner.isEmpty() && !owner.IsEmpty());
- ASSERT(!m_value.isEmpty());
- owner->SetHiddenValue(m_propertyName.get(), get());
- m_owner.set(owner);
- m_owner.get().MakeWeak(this, &V8DependentRetained::weakCallback);
- }
-
-private:
- static v8::Handle<v8::String> createPropertyName()
- {
- StringBuilder name;
- name.appendLiteral("V8DependentRetained");
- name.append(String::numberToStringECMAScript(V8PerIsolateData::current()->nextDependentRetainedId()));
- return V8HiddenPropertyName::hiddenReferenceName(reinterpret_cast<const char*>(name.characters8()), name.length(), NewString);
- }
-
- static void weakCallback(v8::Persistent<v8::Value> object, void* parameter)
- {
- V8DependentRetained* value = static_cast<V8DependentRetained*>(parameter);
- value->release();
- }
-
- void release()
- {
- if (!m_owner.isEmpty())
- m_owner->DeleteHiddenValue(m_propertyName.get());
- m_value.clear();
- m_owner.clear();
- m_propertyName.clear();
- }
-
- ScopedPersistent<v8::Object> m_owner;
- ScopedPersistent<v8::Object> m_value;
- ScopedPersistent<v8::String> m_propertyName;
-};
-
-} // namespace WebCore
-
-#endif // V8DependentRetained_h
Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp (136814 => 136815)
--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp 2012-12-06 08:43:22 UTC (rev 136815)
@@ -50,7 +50,6 @@
, m_hiddenPropertyName(adoptPtr(new V8HiddenPropertyName()))
, m_constructorMode(ConstructorMode::CreateNewObject)
, m_recursionLevel(0)
- , m_nextDependentRetainedId(0)
#ifndef NDEBUG
, m_internalScriptRecursionLevel(0)
#endif
Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h (136814 => 136815)
--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h 2012-12-06 08:32:16 UTC (rev 136814)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h 2012-12-06 08:43:22 UTC (rev 136815)
@@ -109,8 +109,6 @@
int incrementRecursionLevel() { return ++m_recursionLevel; }
int decrementRecursionLevel() { return --m_recursionLevel; }
- int nextDependentRetainedId() { return m_nextDependentRetainedId++; }
-
#ifndef NDEBUG
int internalScriptRecursionLevel() const { return m_internalScriptRecursionLevel; }
int incrementInternalScriptRecursionLevel() { return ++m_internalScriptRecursionLevel; }
@@ -153,7 +151,6 @@
friend class ConstructorMode;
int m_recursionLevel;
- int m_nextDependentRetainedId;
#ifndef NDEBUG
int m_internalScriptRecursionLevel;