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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ScriptValue scriptValue = event->dataAsScriptValue(); | 53 ScriptValue scriptValue = event->dataAsScriptValue(); |
54 if (scriptValue.hasNoValue()) | 54 if (scriptValue.hasNoValue()) |
55 result = v8Null(info.GetIsolate()); | 55 result = v8Null(info.GetIsolate()); |
56 else | 56 else |
57 result = v8::Local<v8::Value>::New(scriptValue.v8Value()); | 57 result = v8::Local<v8::Value>::New(scriptValue.v8Value()); |
58 break; | 58 break; |
59 } | 59 } |
60 | 60 |
61 case MessageEvent::DataTypeSerializedScriptValue: | 61 case MessageEvent::DataTypeSerializedScriptValue: |
62 if (SerializedScriptValue* serializedValue = event->dataAsSerializedScri
ptValue()) | 62 if (SerializedScriptValue* serializedValue = event->dataAsSerializedScri
ptValue()) |
63 result = serializedValue->deserialize(event->ports(), info.GetIsolat
e()); | 63 result = serializedValue->deserialize(info.GetIsolate(), event->port
s()); |
64 else | 64 else |
65 result = v8Null(info.GetIsolate()); | 65 result = v8Null(info.GetIsolate()); |
66 break; | 66 break; |
67 | 67 |
68 case MessageEvent::DataTypeString: { | 68 case MessageEvent::DataTypeString: { |
69 String stringValue = event->dataAsString(); | 69 String stringValue = event->dataAsString(); |
70 result = v8String(stringValue, info.GetIsolate()); | 70 result = v8String(stringValue, info.GetIsolate()); |
71 break; | 71 break; |
72 } | 72 } |
73 | 73 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 v8::Handle<v8::Value> V8MessageEvent::webkitInitMessageEventCallback(const v8::A
rguments& args) | 137 v8::Handle<v8::Value> V8MessageEvent::webkitInitMessageEventCallback(const v8::A
rguments& args) |
138 { | 138 { |
139 INC_STATS("DOM.MessageEvent.webkitInitMessageEvent"); | 139 INC_STATS("DOM.MessageEvent.webkitInitMessageEvent"); |
140 return initMessageEventCallback(args); | 140 return initMessageEventCallback(args); |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 } // namespace WebCore | 144 } // namespace WebCore |
OLD | NEW |