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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return; | 101 return; |
102 v8::Local<v8::Value> dataArg = info[3]; | 102 v8::Local<v8::Value> dataArg = info[3]; |
103 TOSTRING_VOID(V8StringResource<>, originArg, info[4]); | 103 TOSTRING_VOID(V8StringResource<>, originArg, info[4]); |
104 TOSTRING_VOID(V8StringResource<>, lastEventIdArg, info[5]); | 104 TOSTRING_VOID(V8StringResource<>, lastEventIdArg, info[5]); |
105 DOMWindow* sourceArg = toDOMWindow(info.GetIsolate(), info[6]); | 105 DOMWindow* sourceArg = toDOMWindow(info.GetIsolate(), info[6]); |
106 MessagePortArray* portArray = nullptr; | 106 MessagePortArray* portArray = nullptr; |
107 const int portArrayIndex = 7; | 107 const int portArrayIndex = 7; |
108 if (!isUndefinedOrNull(info[portArrayIndex])) { | 108 if (!isUndefinedOrNull(info[portArrayIndex])) { |
109 portArray = new MessagePortArray; | 109 portArray = new MessagePortArray; |
110 *portArray = toMemberNativeArray<MessagePort>(info[portArrayIndex], port
ArrayIndex + 1, info.GetIsolate(), exceptionState); | 110 *portArray = toMemberNativeArray<MessagePort>(info[portArrayIndex], port
ArrayIndex + 1, info.GetIsolate(), exceptionState); |
111 if (exceptionState.throwIfNeeded()) | 111 if (exceptionState.hadException()) |
112 return; | 112 return; |
113 } | 113 } |
114 event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, ScriptValue(Sc
riptState::current(info.GetIsolate()), dataArg), originArg, lastEventIdArg, sour
ceArg, portArray); | 114 event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, ScriptValue(Sc
riptState::current(info.GetIsolate()), dataArg), originArg, lastEventIdArg, sour
ceArg, portArray); |
115 } | 115 } |
116 | 116 |
117 } // namespace blink | 117 } // namespace blink |
OLD | NEW |