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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 if (args[6]->IsObject()) { | 111 if (args[6]->IsObject()) { |
112 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(args[6]); | 112 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(args[6]); |
113 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::GetTemplate(args.GetIsolate(), worldTypeInMainThread(args.GetIsolate())) ); | 113 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::GetTemplate(args.GetIsolate(), worldTypeInMainThread(args.GetIsolate())) ); |
114 if (!window.IsEmpty()) | 114 if (!window.IsEmpty()) |
115 sourceArg = V8Window::toNative(window); | 115 sourceArg = V8Window::toNative(window); |
116 } | 116 } |
117 OwnPtr<MessagePortArray> portArray; | 117 OwnPtr<MessagePortArray> portArray; |
118 | 118 |
119 if (!isUndefinedOrNull(args[7])) { | 119 if (!isUndefinedOrNull(args[7])) { |
120 portArray = adoptPtr(new MessagePortArray); | 120 portArray = adoptPtr(new MessagePortArray); |
121 if (!getMessagePortArray(args[7], *portArray, args.GetIsolate())) | 121 if (!getMessagePortArray(args[7], 8, *portArray, args.GetIsolate())) |
Mike West
2013/10/24 07:08:54
This isn't really your fault, since this call is a
sof
2013/10/24 21:16:41
good idea, done.
I filed http://code.google.com/p
| |
122 return; | 122 return; |
123 } | 123 } |
124 event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, originArg, las tEventIdArg, sourceArg, portArray.release()); | 124 event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, originArg, las tEventIdArg, sourceArg, portArray.release()); |
125 | 125 |
126 if (!dataArg.IsEmpty()) { | 126 if (!dataArg.IsEmpty()) { |
127 args.Holder()->SetHiddenValue(V8HiddenPropertyName::data(args.GetIsolate ()), dataArg); | 127 args.Holder()->SetHiddenValue(V8HiddenPropertyName::data(args.GetIsolate ()), dataArg); |
128 if (isolatedWorldForIsolate(args.GetIsolate())) | 128 if (isolatedWorldForIsolate(args.GetIsolate())) |
129 event->setSerializedData(SerializedScriptValue::createAndSwallowExce ptions(dataArg, args.GetIsolate())); | 129 event->setSerializedData(SerializedScriptValue::createAndSwallowExce ptions(dataArg, args.GetIsolate())); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 void V8MessageEvent::webkitInitMessageEventMethodCustom(const v8::FunctionCallba ckInfo<v8::Value>& args) | 133 void V8MessageEvent::webkitInitMessageEventMethodCustom(const v8::FunctionCallba ckInfo<v8::Value>& args) |
134 { | 134 { |
135 initMessageEventMethodCustom(args); | 135 initMessageEventMethodCustom(args); |
136 } | 136 } |
137 | 137 |
138 | 138 |
139 } // namespace WebCore | 139 } // namespace WebCore |
OLD | NEW |