New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment
link

Issue 905939: Remove __gCrWeb['windowId']

Reported by michaeldo@chromium.org, Nov 16 Project Member

Issue description

It is no longer necessary to inject the windowId into the webpage because every frame generates a frameId which can be used in its place. This is preferable because the windowId injection may fail and there is no need for generating two identifiers.
 

Comment 1 by bugdroid1@chromium.org, Dec 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31e7159aac21f0b3dc84708ff470bb71f5ff99a5

commit 31e7159aac21f0b3dc84708ff470bb71f5ff99a5
Author: Mike Dougherty <michaeldo@chromium.org>
Date: Mon Dec 03 20:28:15 2018

Add note to prefer web::WebFrame API over WebState::ExecuteJavaScript.

Bug: 905939
Change-Id: Iae8ed5b83aa8bb384ed2c8e65f345547f188a986
Reviewed-on: https://chromium-review.googlesource.com/c/1357382
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613217}
[modify] https://crrev.com/31e7159aac21f0b3dc84708ff470bb71f5ff99a5/ios/web/public/web_state/web_state.h

Comment 2 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15dcb43b252c01598f2bd803f761870e1c26000f

commit 15dcb43b252c01598f2bd803f761870e1c26000f
Author: Mike Dougherty <michaeldo@chromium.org>
Date: Fri Dec 14 08:44:53 2018

[iOS] Stop injecting __gCrWeb['windowId'].

Every frame creates a frameId in JavaScript which can be used to
uniquely identify the main frame. Thus the generation and injection of a
windowID is no longer necessary.

Bug: 905939
Change-Id: Icef30a79a1d87bb455e4fb9b2403df74ec5b47b9
Reviewed-on: https://chromium-review.googlesource.com/c/1365410
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616613}
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/BUILD.gn
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/js/BUILD.gn
[delete] https://crrev.com/387b2d22b0afd810758007584f60ab56de0014de/ios/web/web_state/js/crw_js_window_id_manager.h
[delete] https://crrev.com/387b2d22b0afd810758007584f60ab56de0014de/ios/web/web_state/js/crw_js_window_id_manager.mm
[delete] https://crrev.com/387b2d22b0afd810758007584f60ab56de0014de/ios/web/web_state/js/crw_js_window_id_manager_unittest.mm
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/js/page_script_util.mm
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/js/resources/message.js
[delete] https://crrev.com/387b2d22b0afd810758007584f60ab56de0014de/ios/web/web_state/js/resources/window_id.js
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/web_frames_manager_impl.h
[modify] https://crrev.com/15dcb43b252c01598f2bd803f761870e1c26000f/ios/web/web_state/web_frames_manager_impl.mm

Comment 4 by bugdroid1@chromium.org, Jan 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49b63d06df1182372f668ea62e319860427493f6

commit 49b63d06df1182372f668ea62e319860427493f6
Author: Mike Dougherty <michaeldo@chromium.org>
Date: Wed Jan 16 05:19:38 2019

Revert "Remove web::WaitUntilWindowIdInjected test util."

This reverts commit e71108dbd98e09ab4a133f37c5b7448bdf1094a3.

Reason for revert: Removing windowId will be reverted in crrev.com/c/1409811 so this wait should be retained.

Original change's description:
> Remove web::WaitUntilWindowIdInjected test util.
> 
> WindowID is no longer injected so there is no need to wait for it.
> 
> Bug: 905939
> Change-Id: Id1896eeb4a2e00f2f79e7f713443cbc80ac95b33
> Reviewed-on: https://chromium-review.googlesource.com/c/1377339
> Reviewed-by: Eugene But <eugenebut@chromium.org>
> Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#616758}

TBR=eugenebut@chromium.org,michaeldo@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 905939
Change-Id: Ibdeed294047c1f93351cd232979e129ec0f81ace
Reviewed-on: https://chromium-review.googlesource.com/c/1410008
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623119}
[modify] https://crrev.com/49b63d06df1182372f668ea62e319860427493f6/ios/chrome/browser/translate/translate_egtest.mm
[modify] https://crrev.com/49b63d06df1182372f668ea62e319860427493f6/ios/chrome/test/earl_grey/chrome_earl_grey.mm
[modify] https://crrev.com/49b63d06df1182372f668ea62e319860427493f6/ios/web/public/test/earl_grey/js_test_util.h
[modify] https://crrev.com/49b63d06df1182372f668ea62e319860427493f6/ios/web/public/test/earl_grey/js_test_util.mm
[modify] https://crrev.com/49b63d06df1182372f668ea62e319860427493f6/ios/web/shell/test/earl_grey/shell_earl_grey.mm

Comment 5 by bugdroid1@chromium.org, Jan 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb

commit bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb
Author: Mike Dougherty <michaeldo@chromium.org>
Date: Wed Jan 16 23:31:22 2019

Revert "[iOS] Stop injecting __gCrWeb['windowId']."

This reverts commit 15dcb43b252c01598f2bd803f761870e1c26000f.

Reason for revert: The |_queuedScripts| introduced in this CL has the potential to execute a script on an incorrect page is the queue is not invalidated properly. Additional efforts to remove usage of windowID will be implemented before trying to remove windowId completely.

Original change's description:
> [iOS] Stop injecting __gCrWeb['windowId'].
> 
> Every frame creates a frameId in JavaScript which can be used to
> uniquely identify the main frame. Thus the generation and injection of a
> windowID is no longer necessary.
> 
> Bug: 905939
> Change-Id: Icef30a79a1d87bb455e4fb9b2403df74ec5b47b9
> Reviewed-on: https://chromium-review.googlesource.com/c/1365410
> Reviewed-by: Eugene But <eugenebut@chromium.org>
> Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#616613}

TBR=eugenebut@chromium.org,michaeldo@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 905939
Change-Id: I4918ed984e5cd0aeb847c4f4a8bcfd70e8e500a4
Reviewed-on: https://chromium-review.googlesource.com/c/1409811
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623449}
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/BUILD.gn
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/BUILD.gn
[add] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/crw_js_window_id_manager.h
[add] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/crw_js_window_id_manager.mm
[add] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/crw_js_window_id_manager_unittest.mm
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/page_script_util.mm
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/resources/message.js
[add] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/js/resources/window_id.js
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/web_frames_manager_impl.h
[modify] https://crrev.com/bfb04f66f1f17cd7f3a5e3e0fed07cb6b9a8b8eb/ios/web/web_state/web_frames_manager_impl.mm

Sign in to add a comment