| 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 29 matching lines...) Expand all Loading... |
| 40 #include "bindings/core/v8/Transferables.h" | 40 #include "bindings/core/v8/Transferables.h" |
| 41 #include "bindings/core/v8/V8Binding.h" | 41 #include "bindings/core/v8/V8Binding.h" |
| 42 #include "bindings/core/v8/V8EventListener.h" | 42 #include "bindings/core/v8/V8EventListener.h" |
| 43 #include "bindings/core/v8/V8EventListenerList.h" | 43 #include "bindings/core/v8/V8EventListenerList.h" |
| 44 #include "bindings/core/v8/V8HTMLCollection.h" | 44 #include "bindings/core/v8/V8HTMLCollection.h" |
| 45 #include "bindings/core/v8/V8HiddenValue.h" | 45 #include "bindings/core/v8/V8HiddenValue.h" |
| 46 #include "bindings/core/v8/V8Node.h" | 46 #include "bindings/core/v8/V8Node.h" |
| 47 #include "core/dom/DOMArrayBuffer.h" | 47 #include "core/dom/DOMArrayBuffer.h" |
| 48 #include "core/dom/ExceptionCode.h" | 48 #include "core/dom/ExceptionCode.h" |
| 49 #include "core/dom/MessagePort.h" | 49 #include "core/dom/MessagePort.h" |
| 50 #include "core/frame/Deprecation.h" |
| 50 #include "core/frame/FrameView.h" | 51 #include "core/frame/FrameView.h" |
| 51 #include "core/frame/ImageBitmap.h" | 52 #include "core/frame/ImageBitmap.h" |
| 52 #include "core/frame/LocalDOMWindow.h" | 53 #include "core/frame/LocalDOMWindow.h" |
| 53 #include "core/frame/LocalFrame.h" | 54 #include "core/frame/LocalFrame.h" |
| 54 #include "core/frame/Settings.h" | 55 #include "core/frame/Settings.h" |
| 55 #include "core/frame/UseCounter.h" | 56 #include "core/frame/UseCounter.h" |
| 56 #include "core/frame/csp/ContentSecurityPolicy.h" | 57 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 57 #include "core/html/HTMLCollection.h" | 58 #include "core/html/HTMLCollection.h" |
| 58 #include "core/html/HTMLDocument.h" | 59 #include "core/html/HTMLDocument.h" |
| 59 #include "core/inspector/InspectorInstrumentation.h" | 60 #include "core/inspector/InspectorInstrumentation.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Per current spec: | 192 // Per current spec: |
| 192 // postMessage(message, targetOrigin) | 193 // postMessage(message, targetOrigin) |
| 193 // postMessage(message, targetOrigin, {sequence of transferrables}) | 194 // postMessage(message, targetOrigin, {sequence of transferrables}) |
| 194 // Legacy non-standard implementations in webkit allowed: | 195 // Legacy non-standard implementations in webkit allowed: |
| 195 // postMessage(message, {sequence of transferrables}, targetOrigin); | 196 // postMessage(message, {sequence of transferrables}, targetOrigin); |
| 196 Transferables transferables; | 197 Transferables transferables; |
| 197 int targetOriginArgIndex = 1; | 198 int targetOriginArgIndex = 1; |
| 198 if (info.Length() > 2) { | 199 if (info.Length() > 2) { |
| 199 int transferablesArgIndex = 2; | 200 int transferablesArgIndex = 2; |
| 200 if (isLegacyTargetOriginDesignation(info[2])) { | 201 if (isLegacyTargetOriginDesignation(info[2])) { |
| 201 UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->frame
(), UseCounter::WindowPostMessageWithLegacyTargetOriginArgument); | 202 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), w
indow->document(), UseCounter::WindowPostMessageWithLegacyTargetOriginArgument); |
| 202 targetOriginArgIndex = 2; | 203 targetOriginArgIndex = 2; |
| 203 transferablesArgIndex = 1; | 204 transferablesArgIndex = 1; |
| 204 } | 205 } |
| 205 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState))
{ | 206 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState))
{ |
| 206 exceptionState.throwIfNeeded(); | 207 exceptionState.throwIfNeeded(); |
| 207 return; | 208 return; |
| 208 } | 209 } |
| 209 } | 210 } |
| 210 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, targetOri
gin, info[targetOriginArgIndex]); | 211 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, targetOri
gin, info[targetOriginArgIndex]); |
| 211 | 212 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 if (items->hasExactlyOneItem()) { | 339 if (items->hasExactlyOneItem()) { |
| 339 v8SetReturnValueFast(info, items->item(0), window); | 340 v8SetReturnValueFast(info, items->item(0), window); |
| 340 return; | 341 return; |
| 341 } | 342 } |
| 342 v8SetReturnValueFast(info, items, window); | 343 v8SetReturnValueFast(info, items, window); |
| 343 return; | 344 return; |
| 344 } | 345 } |
| 345 } | 346 } |
| 346 | 347 |
| 347 } // namespace blink | 348 } // namespace blink |
| OLD | NEW |