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

Unified Diff: Source/modules/webaudio/AudioBuffer.cpp

Issue 1183763003: Remove ArrayBufferDeallocationObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move callback to WTF.cpp Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/webaudio/AudioBuffer.cpp
diff --git a/Source/modules/webaudio/AudioBuffer.cpp b/Source/modules/webaudio/AudioBuffer.cpp
index a3462590825de07f0a8a177e07bdca7ac40b3f3a..50536645c0f87be7412d3db8594684ff99854c89 100644
--- a/Source/modules/webaudio/AudioBuffer.cpp
+++ b/Source/modules/webaudio/AudioBuffer.cpp
@@ -32,7 +32,6 @@
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
-#include "core/dom/DOMArrayBufferDeallocationObserver.h"
#include "core/dom/ExceptionCode.h"
#include "modules/webaudio/AudioContext.h"
#include "platform/audio/AudioBus.h"
@@ -326,23 +325,6 @@ void AudioBuffer::zero()
}
}
-v8::Local<v8::Object> AudioBuffer::associateWithWrapper(v8::Isolate* isolate, const WrapperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper)
-{
- ScriptWrappable::associateWithWrapper(isolate, wrapperType, wrapper);
-
- if (!wrapper.IsEmpty()) {
- // We only setDeallocationObservers on array buffers that are held by
- // some object in the V8 heap, not in the ArrayBuffer constructor
- // itself. This is because V8 GC only cares about memory it can free on
- // GC, and until the object is exposed to JavaScript, V8 GC doesn't
- // affect it.
- for (unsigned i = 0, n = numberOfChannels(); i < n; ++i) {
- getChannelData(i)->buffer()->setDeallocationObserver(DOMArrayBufferDeallocationObserver::instance());
- }
- }
- return wrapper;
-}
-
} // namespace blink
#endif // ENABLE(WEB_AUDIO)

Powered by Google App Engine
This is Rietveld 408576698