| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bool canBubbleArg = false; | 103 bool canBubbleArg = false; |
| 104 bool cancelableArg = false; | 104 bool cancelableArg = false; |
| 105 if (!v8Call(info[1]->BooleanValue(info.GetIsolate()->GetCurrentContext()), | 105 if (!v8Call(info[1]->BooleanValue(info.GetIsolate()->GetCurrentContext()), |
| 106 canBubbleArg) || | 106 canBubbleArg) || |
| 107 !v8Call(info[2]->BooleanValue(info.GetIsolate()->GetCurrentContext()), | 107 !v8Call(info[2]->BooleanValue(info.GetIsolate()->GetCurrentContext()), |
| 108 cancelableArg)) | 108 cancelableArg)) |
| 109 return; | 109 return; |
| 110 v8::Local<v8::Value> dataArg = info[3]; | 110 v8::Local<v8::Value> dataArg = info[3]; |
| 111 TOSTRING_VOID(V8StringResource<>, originArg, info[4]); | 111 TOSTRING_VOID(V8StringResource<>, originArg, info[4]); |
| 112 TOSTRING_VOID(V8StringResource<>, lastEventIdArg, info[5]); | 112 TOSTRING_VOID(V8StringResource<>, lastEventIdArg, info[5]); |
| 113 DOMWindow* sourceArg = toDOMWindow(info.GetIsolate(), info[6]); | 113 EventTarget* sourceArg = toEventTarget(info.GetIsolate(), info[6]); |
| 114 MessagePortArray* portArray = nullptr; | 114 MessagePortArray* portArray = nullptr; |
| 115 const int portArrayIndex = 7; | 115 const int portArrayIndex = 7; |
| 116 if (!isUndefinedOrNull(info[portArrayIndex])) { | 116 if (!isUndefinedOrNull(info[portArrayIndex])) { |
| 117 portArray = new MessagePortArray; | 117 portArray = new MessagePortArray; |
| 118 *portArray = toMemberNativeArray<MessagePort>( | 118 *portArray = toMemberNativeArray<MessagePort>( |
| 119 info[portArrayIndex], portArrayIndex + 1, info.GetIsolate(), | 119 info[portArrayIndex], portArrayIndex + 1, info.GetIsolate(), |
| 120 exceptionState); | 120 exceptionState); |
| 121 if (exceptionState.hadException()) | 121 if (exceptionState.hadException()) |
| 122 return; | 122 return; |
| 123 } | 123 } |
| 124 event->initMessageEvent( | 124 event->initMessageEvent( |
| 125 typeArg, canBubbleArg, cancelableArg, | 125 typeArg, canBubbleArg, cancelableArg, |
| 126 ScriptValue(ScriptState::current(info.GetIsolate()), dataArg), originArg, | 126 ScriptValue(ScriptState::current(info.GetIsolate()), dataArg), originArg, |
| 127 lastEventIdArg, sourceArg, portArray); | 127 lastEventIdArg, sourceArg, portArray); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace blink | 130 } // namespace blink |
| OLD | NEW |