Diff
Modified: trunk/LayoutTests/ChangeLog (119852 => 119853)
--- trunk/LayoutTests/ChangeLog 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/LayoutTests/ChangeLog 2012-06-08 19:05:18 UTC (rev 119853)
@@ -1,3 +1,14 @@
+2012-06-08 Erik Arvidsson <[email protected]>
+
+ [V8] Keep TextTrackList alive as long as its owner is alive
+ https://bugs.webkit.org/show_bug.cgi?id=88541
+
+ Reviewed by Adam Barth.
+
+ Add a hidden reference from the owner to the text track list.
+
+ * platform/chromium/TestExpectations:
+
2012-06-08 Tony Chang <[email protected]>
[chromium] Unreviewed, rebaseline platform/chromium-linux/fast/text/chromium-linux-fontconfig-renderstyle.html after skia gamma correction
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (119852 => 119853)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-08 19:05:18 UTC (rev 119853)
@@ -3288,7 +3288,6 @@
BUGWK66953 : transitions/default-timing-function.html = PASS FAIL
-BUGWK73865 : media/track/tracklist-is-reachable.html = TEXT CRASH
BUGWK73865 : media/track/text-track-cue-is-reachable.html = TEXT CRASH
BUGWK73865 : media/track/text-track-is-reachable.html = TEXT CRASH
Modified: trunk/Source/WebCore/ChangeLog (119852 => 119853)
--- trunk/Source/WebCore/ChangeLog 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/ChangeLog 2012-06-08 19:05:18 UTC (rev 119853)
@@ -1,3 +1,24 @@
+2012-06-08 Erik Arvidsson <[email protected]>
+
+ [V8] Keep TextTrackList alive as long as its owner is alive
+ https://bugs.webkit.org/show_bug.cgi?id=88541
+
+ Reviewed by Adam Barth.
+
+ Add a hidden reference from the owner to the text track list.
+
+ Covered by existing tests.
+
+ * Target.pri: Add V8TextTrackListCustom.cpp.
+ * UseV8.cmake: Ditto.
+ * WebCore.gypi: Ditto.
+ * bindings/v8/V8HiddenPropertyName.h:
+ (WebCore):
+ * bindings/v8/custom/V8TextTrackListCustom.cpp: Copied from Source/WebCore/bindings/v8/V8HiddenPropertyName.h.
+ (WebCore):
+ (WebCore::toV8): When the wrapper is created add a reference to the owner of the TextTrackList to the TextTrackList.
+ * html/track/TextTrackList.idl:
+
2012-06-08 Ian Vollick <[email protected]>
[chromium] Accelerated animations should use WebTransformOperations
Modified: trunk/Source/WebCore/Target.pri (119852 => 119853)
--- trunk/Source/WebCore/Target.pri 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/Target.pri 2012-06-08 19:05:18 UTC (rev 119853)
@@ -220,6 +220,7 @@
bindings/v8/custom/V8StorageCustom.cpp \
bindings/v8/custom/V8StyleSheetCustom.cpp \
bindings/v8/custom/V8StyleSheetListCustom.cpp \
+ bindings/v8/custom/V8TextTrackListCustom.cpp \
bindings/v8/custom/V8WebKitAnimationCustom.cpp \
bindings/v8/custom/V8WebKitMutationObserverCustom.cpp \
bindings/v8/custom/V8WebKitPointConstructor.cpp \
Modified: trunk/Source/WebCore/UseV8.cmake (119852 => 119853)
--- trunk/Source/WebCore/UseV8.cmake 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/UseV8.cmake 2012-06-08 19:05:18 UTC (rev 119853)
@@ -146,6 +146,7 @@
bindings/v8/custom/V8StorageCustom.cpp
bindings/v8/custom/V8StyleSheetCustom.cpp
bindings/v8/custom/V8StyleSheetListCustom.cpp
+ bindings/v8/custom/V8TextTrackListCustom.cpp
bindings/v8/custom/V8Uint16ArrayCustom.cpp
bindings/v8/custom/V8Uint32ArrayCustom.cpp
bindings/v8/custom/V8Uint8ArrayCustom.cpp
Modified: trunk/Source/WebCore/WebCore.gypi (119852 => 119853)
--- trunk/Source/WebCore/WebCore.gypi 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/WebCore.gypi 2012-06-08 19:05:18 UTC (rev 119853)
@@ -2330,6 +2330,7 @@
'bindings/v8/custom/V8StorageCustom.cpp',
'bindings/v8/custom/V8StyleSheetCustom.cpp',
'bindings/v8/custom/V8StyleSheetListCustom.cpp',
+ 'bindings/v8/custom/V8TextTrackListCustom.cpp',
'bindings/v8/custom/V8TrackEventCustom.cpp',
'bindings/v8/custom/V8Uint16ArrayCustom.cpp',
'bindings/v8/custom/V8Uint32ArrayCustom.cpp',
Modified: trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h (119852 => 119853)
--- trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h 2012-06-08 19:05:18 UTC (rev 119853)
@@ -46,7 +46,8 @@
V(state) \
V(domStringMap) \
V(domTokenList) \
- V(ownerNode)
+ V(ownerNode) \
+ V(textTracks)
class V8HiddenPropertyName {
public:
Copied: trunk/Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp (from rev 119852, trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h) (0 => 119853)
--- trunk/Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp 2012-06-08 19:05:18 UTC (rev 119853)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 THE COPYRIGHT
+ * OWNER 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.
+ */
+
+#include "config.h"
+#include "V8TextTrackList.h"
+
+#include "TextTrackList.h"
+#include "V8Binding.h"
+#include "V8DOMWrapper.h"
+#include "V8HTMLMediaElement.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> toV8(TextTrackList* impl, v8::Isolate* isolate)
+{
+ if (!impl)
+ return v8NullWithCheck(isolate);
+ v8::Handle<v8::Object> wrapper = V8TextTrackList::wrap(impl, isolate);
+
+ // Add a hidden reference from the media element to the text track list.
+ Node* element = impl->owner();
+ if (!wrapper.IsEmpty() && element) {
+ v8::Handle<v8::Value> elementValue = toV8(element, isolate);
+ if (!elementValue.IsEmpty() && elementValue->IsObject())
+ elementValue.As<v8::Object>()->SetHiddenValue(V8HiddenPropertyName::textTracks(), wrapper);
+ }
+ return wrapper;
+}
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/html/track/TextTrackList.idl (119852 => 119853)
--- trunk/Source/WebCore/html/track/TextTrackList.idl 2012-06-08 18:53:56 UTC (rev 119852)
+++ trunk/Source/WebCore/html/track/TextTrackList.idl 2012-06-08 19:05:18 UTC (rev 119853)
@@ -28,6 +28,7 @@
interface [
Conditional=VIDEO_TRACK,
V8EnabledAtRuntime=webkitVideoTrack,
+ V8CustomToJSObject,
IndexedGetter,
EventTarget,
JSCustomMarkFunction,