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

Unified Diff: Source/bindings/core/v8/custom/V8MessageEventCustom.cpp

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXME comments. Created 6 years, 3 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/bindings/core/v8/custom/V8MessageEventCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
index 2337363283885422c224119091a2187ce50f022e..b0090361c53a9853e44dc5c17a8c64f2101a2e17 100644
--- a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
@@ -42,37 +42,6 @@
namespace blink {
-// Ensures a wrapper is created for the data to return now so that V8 knows how
-// much memory is used via the wrapper. To keep the wrapper alive, it's set to
-// the wrapper of the MessageEvent as a hidden value.
-static void ensureWrapperCreatedAndAssociated(MessageEvent* eventImpl, v8::Handle<v8::Object> eventWrapper, v8::Isolate* isolate)
-{
- switch (eventImpl->dataType()) {
- case MessageEvent::DataTypeScriptValue:
- case MessageEvent::DataTypeSerializedScriptValue:
- break;
- case MessageEvent::DataTypeString: {
- String stringValue = eventImpl->dataAsString();
- V8HiddenValue::setHiddenValue(isolate, eventWrapper, V8HiddenValue::stringData(isolate), v8String(isolate, stringValue));
- break;
- }
- case MessageEvent::DataTypeBlob:
- break;
- case MessageEvent::DataTypeArrayBuffer:
- V8HiddenValue::setHiddenValue(isolate, eventWrapper, V8HiddenValue::arrayBufferData(isolate), toV8(eventImpl->dataAsArrayBuffer(), eventWrapper, isolate));
- break;
- }
-}
-
-v8::Handle<v8::Object> wrap(MessageEvent* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
- ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8MessageEvent>(impl, isolate));
- v8::Handle<v8::Object> wrapper = V8MessageEvent::createWrapper(impl, creationContext, isolate);
- ensureWrapperCreatedAndAssociated(impl, wrapper, isolate);
- return wrapper;
-}
-
void V8MessageEvent::dataAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
{
MessageEvent* event = V8MessageEvent::toNative(info.Holder());
« no previous file with comments | « Source/bindings/core/v8/custom/V8ImageDataCustom.cpp ('k') | Source/bindings/core/v8/custom/V8NodeCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698