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