| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // postMessage(message, {sequence of transferrables}, targetOrigin); | 262 // postMessage(message, {sequence of transferrables}, targetOrigin); |
| 263 MessagePortArray portArray; | 263 MessagePortArray portArray; |
| 264 ArrayBufferArray arrayBufferArray; | 264 ArrayBufferArray arrayBufferArray; |
| 265 int targetOriginArgIndex = 1; | 265 int targetOriginArgIndex = 1; |
| 266 if (info.Length() > 2) { | 266 if (info.Length() > 2) { |
| 267 int transferablesArgIndex = 2; | 267 int transferablesArgIndex = 2; |
| 268 if (isLegacyTargetOriginDesignation(info[2])) { | 268 if (isLegacyTargetOriginDesignation(info[2])) { |
| 269 targetOriginArgIndex = 2; | 269 targetOriginArgIndex = 2; |
| 270 transferablesArgIndex = 1; | 270 transferablesArgIndex = 1; |
| 271 } | 271 } |
| 272 if (!SerializedScriptValue::extractTransferables(info[transferablesArgIn
dex], transferablesArgIndex, portArray, arrayBufferArray, exceptionState, info.G
etIsolate())) { | 272 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, portArray, arrayBufferArray, exc
eptionState)) { |
| 273 exceptionState.throwIfNeeded(); | 273 exceptionState.throwIfNeeded(); |
| 274 return; | 274 return; |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, targetOri
gin, info[targetOriginArgIndex]); | 277 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, targetOri
gin, info[targetOriginArgIndex]); |
| 278 | 278 |
| 279 RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0
], &portArray, &arrayBufferArray, exceptionState, info.GetIsolate()); | 279 RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0
], &portArray, &arrayBufferArray, exceptionState, info.GetIsolate()); |
| 280 if (exceptionState.throwIfNeeded()) | 280 if (exceptionState.throwIfNeeded()) |
| 281 return; | 281 return; |
| 282 | 282 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren
t(isolate)); | 542 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren
t(isolate)); |
| 543 if (context.IsEmpty()) | 543 if (context.IsEmpty()) |
| 544 return v8Undefined(); | 544 return v8Undefined(); |
| 545 | 545 |
| 546 v8::Handle<v8::Object> global = context->Global(); | 546 v8::Handle<v8::Object> global = context->Global(); |
| 547 ASSERT(!global.IsEmpty()); | 547 ASSERT(!global.IsEmpty()); |
| 548 return global; | 548 return global; |
| 549 } | 549 } |
| 550 | 550 |
| 551 } // namespace blink | 551 } // namespace blink |
| OLD | NEW |