Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp

Issue 303593002: Oilpan: prevent player from accessing its media element during finalization (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch back to initial approach + FIXMEs for follow-up work Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" 6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
7 7
8 #include "RuntimeEnabledFeatures.h" 8 #include "RuntimeEnabledFeatures.h"
9 #include "bindings/v8/ExceptionState.h" 9 #include "bindings/v8/ExceptionState.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 if (RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled()) { 331 if (RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled()) {
332 // Send event for v0.1b EME. 332 // Send event for v0.1b EME.
333 RefPtrWillBeRawPtr<Event> event = createWebkitNeedKeyEvent(contentType, initData, initDataLength); 333 RefPtrWillBeRawPtr<Event> event = createWebkitNeedKeyEvent(contentType, initData, initDataLength);
334 event->setTarget(&element); 334 event->setTarget(&element);
335 element.scheduleEvent(event.release()); 335 element.scheduleEvent(event.release());
336 } 336 }
337 } 337 }
338 338
339 void HTMLMediaElementEncryptedMedia::playerDestroyed(HTMLMediaElement& element) 339 void HTMLMediaElementEncryptedMedia::playerDestroyed(HTMLMediaElement& element)
340 { 340 {
341 #if ENABLE(OILPAN)
342 // FIXME: Oilpan: remove this once the media player is on the heap. crbug.co m/378229
343 if (element.isFinalizing())
344 return;
345 #endif
346
341 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element); 347 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element);
342 thisElement.setMediaKeysInternal(element, 0); 348 thisElement.setMediaKeysInternal(element, 0);
343 } 349 }
344 350
345 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp tionModule(HTMLMediaElement& element) 351 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp tionModule(HTMLMediaElement& element)
346 { 352 {
347 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element); 353 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element);
348 return thisElement.contentDecryptionModule(); 354 return thisElement.contentDecryptionModule();
349 } 355 }
350 356
351 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) 357 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor)
352 { 358 {
353 visitor->trace(m_mediaKeys); 359 visitor->trace(m_mediaKeys);
354 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); 360 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor);
355 } 361 }
356 362
357 } // namespace WebCore 363 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698