Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 425896 Remove legacy WebKit postMessage overload
Starred by 6 users Reported by phistuck@gmail.com, Oct 22 2014 Back to list
Status: Fixed
Owner:
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on: View detail
issue 640825
issue 649157



Sign in to add a comment
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36

Steps to reproduce the problem:
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp&rcl=1413836064&l=257

     // This function has variable arguments and can be:
     // Per current spec:
     //   postMessage(message, targetOrigin)
     //   postMessage(message, targetOrigin, {sequence of transferrables})
     // Legacy non-standard implementations in webkit allowed:
     //   postMessage(message, {sequence of transferrables}, targetOrigin);

A use counter should be added and a removal of this overload should be evaluated based on such.

What is the expected behavior?

What went wrong?
This exists. :)

Did this work before? No 

Chrome version: 38.0.2125.104  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 15.0 r0
 
Labels: -OS-Windows Cr-Blink-Bindings Cr-Blink-DOM
Status: Untriaged
Comment 2 by sigbjo...@opera.com, Oct 22 2014
See https://www.w3.org/Bugs/Public/show_bug.cgi?id=13967 for earlier context/discussion.
Comment 3 by sigbjo...@opera.com, Oct 22 2014
And blink-dev thread where this was raised,

   https://groups.google.com/a/chromium.org/d/msg/blink-dev/QfxPGw0kJW8/ha_g1oemSTwJ
Project Member Comment 4 by bugdroid1@chromium.org, Oct 22 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=184160

------------------------------------------------------------------
r184160 | sigbjornf@opera.com | 2014-10-22T10:16:47.150175Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/frame/UseCounter.h?r1=184160&r2=184159&pathrev=184160
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/core/v8/custom/V8WindowCustom.cpp?r1=184160&r2=184159&pathrev=184160

Add window.postMessage() use counters.

Instrument postMessage() to determine usage of the overload

  postMessage(data, origin, transferables)

R=mkwst
BUG= 425896 

Review URL: https://codereview.chromium.org/670893003
-----------------------------------------------------------------
Cc: dominicc@chromium.org
Labels: -Pri-2 Pri-3
Owner: sigbjo...@opera.com
Status: Assigned
Usage of this is extremely low (0.0036%):

https://www.chromestatus.com/metrics/feature/timeline/popularity/575

Can we move forward with removing this?
Project Member Comment 6 by bugdroid1@chromium.org, Apr 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48b609eca30c2bbcb91d74bc311f0fd34b030ab4

commit 48b609eca30c2bbcb91d74bc311f0fd34b030ab4
Author: sigbjornf <sigbjornf@opera.com>
Date: Tue Apr 26 16:19:37 2016

Deprecate window.postMessage(m, transferables, origin) overload.

This argument-swapped legacy overload has little use, hence it
is time to try to phase it out. Deprecate with view to removing
in M54.

Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/h4ooaB_Y9JE/nh7vXshGBwAJ

R=
BUG= 425896 

Review URL: https://codereview.chromium.org/1903873004

Cr-Commit-Position: refs/heads/master@{#389800}

[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/LayoutTests/fast/events/message-port-deleted-document.html
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/LayoutTests/fast/events/message-port-deleted-frame.html
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/LayoutTests/fast/events/message-port-inactive-document.html
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/LayoutTests/fast/events/message-port.html
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/48b609eca30c2bbcb91d74bc311f0fd34b030ab4/third_party/WebKit/Source/core/frame/Deprecation.cpp

Comment 7 by tkent@chromium.org, May 17 2016
Components: -Blink>DOM Blink>HTML
Comment 8 by tkent@chromium.org, Jun 8 2016
Labels: Hotlist-Interop
saved_resource(1).html
124 KB View Download
saved_resource(2).html
317 KB View Download
saved_resource.html
3.1 KB View Download
Is this removal still planned for M54?
Blockedon: 640825
Project Member Comment 12 by bugdroid1@chromium.org, Sep 7
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77a58a92f789f4fd7099b2b4ff87cad27eea3067

commit 77a58a92f789f4fd7099b2b4ff87cad27eea3067
Author: foolip <foolip@chromium.org>
Date: Wed Sep 07 21:56:44 2016

Remove window.postMessage(message, transferables, targetOrigin) legacy overload

Intent to Deprecate and Remove:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/h4ooaB_Y9JE/nh7vXshGBwAJ

BUG= 425896 , 640825 
R=sigbjornf@opera.com,haraken@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2295863002
Cr-Commit-Position: refs/heads/master@{#417066}

[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/chrome/third_party/chromevox/chromevox/injected/mathjax.js
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/77a58a92f789f4fd7099b2b4ff87cad27eea3067/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js

Labels: Merge-Request-54
Requesting merge to M54 since the deprecation message said this was going to be removed in M54.
Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member Comment 15 by sheriffbot@chromium.org, Sep 12
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member Comment 16 by bugdroid1@chromium.org, Sep 13
Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2

commit 48caa2cebaf1723dcfd8665e4859d90e2b55f2a2
Author: Philip Jägenstedt <foolip@chromium.org>
Date: Tue Sep 13 09:10:15 2016

Remove window.postMessage(message, transferables, targetOrigin) legacy overload

Intent to Deprecate and Remove:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/h4ooaB_Y9JE/nh7vXshGBwAJ

BUG= 425896 , 640825 
R=sigbjornf@opera.com,haraken@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2295863002
Cr-Commit-Position: refs/heads/master@{#417066}
(cherry picked from commit 77a58a92f789f4fd7099b2b4ff87cad27eea3067)

Review URL: https://codereview.chromium.org/2336133002 .

Cr-Commit-Position: refs/branch-heads/2840@{#322}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/chrome/third_party/chromevox/chromevox/injected/mathjax.js
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js

Summary: Remove legacy WebKit postMessage overload (was: Evaluate removing legacy WebKit postMessage overload)
Status: Fixed
phistuck@, did you also file a WebKit bug for this?
Project Member Comment 20 by bugdroid1@chromium.org, Sep 13
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a91dd1d7611e879f8d03bf533c45fa229ed7246d

commit a91dd1d7611e879f8d03bf533c45fa229ed7246d
Author: foolip <foolip@chromium.org>
Date: Tue Sep 13 11:39:27 2016

Restore replacedWillBeRemoved to fix compile after postMessage changes

It is still in use on the M54 branch (2840) but wasn't on master.

This can't be landed on master and backported, precisely because it
is unused, which causes a warning, and -Werror is enabled.

BUG= 425896 , 640825 
TBR=sigbjornf@opera.com,haraken@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2331293004
Cr-Commit-Position: refs/branch-heads/2840@{#325}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/a91dd1d7611e879f8d03bf533c45fa229ed7246d/third_party/WebKit/Source/core/frame/Deprecation.cpp

#19 -
No, I did not, but I just did -
https://bugs.webkit.org/show_bug.cgi?id=161911

I love this question, though. I wish and hope everyone asks (and makes sure a bug is indeed filed) it about every Chrome bug that is likely inherited from WebKit.
Thanks, that's great!
Blockedon: 649157
Due to issue 649157 the removal will be delayed until M55.
Project Member Comment 25 by bugdroid1@chromium.org, Sep 23
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02e8f6388671df5060e592759831ea27a1a84e38

commit 02e8f6388671df5060e592759831ea27a1a84e38
Author: foolip <foolip@chromium.org>
Date: Fri Sep 23 11:24:40 2016

Revert "Remove window.postMessage(message, transferables, targetOrigin) legacy overload"

This reverts commits a91dd1d7611e879f8d03bf533c45fa229ed7246d and
48caa2cebaf1723dcfd8665e4859d90e2b55f2a2.

In addition:
 * Update the deprecation message for M55 removal.
 * Exclude changes to postMessage calls outside of tests, as those might
   otherwise trigger the deprecation message.

BUG= 425896 , 649157 
TBR=sigbjornf@opera.com,haraken@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2362693004
Cr-Commit-Position: refs/branch-heads/2840@{#509}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/core/frame/UseCounter.h

Project Member Comment 26 by bugdroid1@chromium.org, Oct 27
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2

commit 48caa2cebaf1723dcfd8665e4859d90e2b55f2a2
Author: Philip Jägenstedt <foolip@chromium.org>
Date: Tue Sep 13 09:10:15 2016

Remove window.postMessage(message, transferables, targetOrigin) legacy overload

Intent to Deprecate and Remove:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/h4ooaB_Y9JE/nh7vXshGBwAJ

BUG= 425896 , 640825 
R=sigbjornf@opera.com,haraken@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2295863002
Cr-Commit-Position: refs/heads/master@{#417066}
(cherry picked from commit 77a58a92f789f4fd7099b2b4ff87cad27eea3067)

Review URL: https://codereview.chromium.org/2336133002 .

Cr-Commit-Position: refs/branch-heads/2840@{#322}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/chrome/third_party/chromevox/chromevox/injected/mathjax.js
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/48caa2cebaf1723dcfd8665e4859d90e2b55f2a2/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js

Project Member Comment 27 by bugdroid1@chromium.org, Oct 27
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a91dd1d7611e879f8d03bf533c45fa229ed7246d

commit a91dd1d7611e879f8d03bf533c45fa229ed7246d
Author: foolip <foolip@chromium.org>
Date: Tue Sep 13 11:39:27 2016

Restore replacedWillBeRemoved to fix compile after postMessage changes

It is still in use on the M54 branch (2840) but wasn't on master.

This can't be landed on master and backported, precisely because it
is unused, which causes a warning, and -Werror is enabled.

BUG= 425896 , 640825 
TBR=sigbjornf@opera.com,haraken@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2331293004
Cr-Commit-Position: refs/branch-heads/2840@{#325}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/a91dd1d7611e879f8d03bf533c45fa229ed7246d/third_party/WebKit/Source/core/frame/Deprecation.cpp

Project Member Comment 28 by bugdroid1@chromium.org, Oct 27
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02e8f6388671df5060e592759831ea27a1a84e38

commit 02e8f6388671df5060e592759831ea27a1a84e38
Author: foolip <foolip@chromium.org>
Date: Fri Sep 23 11:24:40 2016

Revert "Remove window.postMessage(message, transferables, targetOrigin) legacy overload"

This reverts commits a91dd1d7611e879f8d03bf533c45fa229ed7246d and
48caa2cebaf1723dcfd8665e4859d90e2b55f2a2.

In addition:
 * Update the deprecation message for M55 removal.
 * Exclude changes to postMessage calls outside of tests, as those might
   otherwise trigger the deprecation message.

BUG= 425896 , 649157 
TBR=sigbjornf@opera.com,haraken@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2362693004
Cr-Commit-Position: refs/branch-heads/2840@{#509}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/02e8f6388671df5060e592759831ea27a1a84e38/third_party/WebKit/Source/core/frame/UseCounter.h

Sign in to add a comment