Source/bindings/v8/custom/V8MessageEventCustom.cpp
// 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.
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.
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;
    }
}
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 ; } }
Ensures a wrapper is created for the data to return now so that V8 knows how
much memory is used via the wrapper.
Ensures a wrapper is created for the data to return now so that V8 knows how much memory is used via the wrapper .