| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 case MessageEvent::DataTypeScriptValue: | 61 case MessageEvent::DataTypeScriptValue: |
| 62 result = event->dataAsScriptValue().v8ValueFor(scriptState); | 62 result = event->dataAsScriptValue().v8ValueFor(scriptState); |
| 63 if (result.IsEmpty()) | 63 if (result.IsEmpty()) |
| 64 result = v8::Null(info.GetIsolate()); | 64 result = v8::Null(info.GetIsolate()); |
| 65 break; | 65 break; |
| 66 | 66 |
| 67 case MessageEvent::DataTypeSerializedScriptValue: | 67 case MessageEvent::DataTypeSerializedScriptValue: |
| 68 if (SerializedScriptValue* serializedValue = | 68 if (SerializedScriptValue* serializedValue = |
| 69 event->dataAsSerializedScriptValue()) { | 69 event->dataAsSerializedScriptValue()) { |
| 70 MessagePortArray ports = event->ports(); | 70 MessagePortArray ports = event->ports(); |
| 71 result = serializedValue->deserialize(info.GetIsolate(), &ports); | 71 SerializedScriptValue::DeserializeOptions options; |
| 72 options.messagePorts = &ports; |
| 73 result = serializedValue->deserialize(info.GetIsolate(), options); |
| 72 } else { | 74 } else { |
| 73 result = v8::Null(info.GetIsolate()); | 75 result = v8::Null(info.GetIsolate()); |
| 74 } | 76 } |
| 75 break; | 77 break; |
| 76 | 78 |
| 77 case MessageEvent::DataTypeString: | 79 case MessageEvent::DataTypeString: |
| 78 result = v8String(info.GetIsolate(), event->dataAsString()); | 80 result = v8String(info.GetIsolate(), event->dataAsString()); |
| 79 break; | 81 break; |
| 80 | 82 |
| 81 case MessageEvent::DataTypeBlob: | 83 case MessageEvent::DataTypeBlob: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (exceptionState.hadException()) | 125 if (exceptionState.hadException()) |
| 124 return; | 126 return; |
| 125 } | 127 } |
| 126 event->initMessageEvent( | 128 event->initMessageEvent( |
| 127 typeArg, canBubbleArg, cancelableArg, | 129 typeArg, canBubbleArg, cancelableArg, |
| 128 ScriptValue(ScriptState::current(info.GetIsolate()), dataArg), originArg, | 130 ScriptValue(ScriptState::current(info.GetIsolate()), dataArg), originArg, |
| 129 lastEventIdArg, sourceArg, portArray); | 131 lastEventIdArg, sourceArg, portArray); |
| 130 } | 132 } |
| 131 | 133 |
| 132 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |