|
|
DescriptionBindings: Remove DOMWrapperWorld::fromWorldId() for cleanup
This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter
but actually has a side effect like this:
1) When a given id is for the main world, ensures the main world and returns it.
2) When a given id is for an isolated world, ensures the isolated world and
returns it.
3) Otherwise, looks up a given id in the world map and then returns the finding.
If the world doesn't exist, returns nullptr.
After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for
2). fromWorldId() hasn't been used for 3), so this CL does not introduce an
alternative for the case.
Also, this CL pushes the main world into the world map for cleanup. Before this
CL, the main world is managed separately from other worlds. Managing all worlds
in the single map would be simpler.
BUG=697622, 697629
Review-Url: https://codereview.chromium.org/2753013003
Cr-Commit-Position: refs/heads/master@{#457739}
Committed: https://chromium.googlesource.com/chromium/src/+/1d85fa7d0be347292a5805ec87ca3d2d10a8c57f
Patch Set 1 #Patch Set 2 : fix builds #Patch Set 3 : rebase #
Messages
Total messages: 31 (22 generated)
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that behaves oddly: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a world in the world map and then returns it. If the world doesn't exist, returns nullptr. Instead of fromWorldId(), this CL makes the callers directly use mainWorld() or ensureIsolatedWorld(). Also, this CL pushes the main world into the world map. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simple. BUG= ==========
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that behaves oddly: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a world in the world map and then returns it. If the world doesn't exist, returns nullptr. Instead of fromWorldId(), this CL makes the callers directly use mainWorld() or ensureIsolatedWorld(). Also, this CL pushes the main world into the world map. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simple. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that behaves oddly: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() or ensureIsolatedWorld() should directly be used instead of fromWorldId(). Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ==========
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that behaves oddly: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() or ensureIsolatedWorld() should directly be used instead of fromWorldId(). Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() or ensureIsolatedWorld() should directly be used instead of fromWorldId(). Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: - When a given id is for the main world, ensures the main world and returns it. - When a given id is for an isolated world, ensures the isolated world and returns it. - Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() or ensureIsolatedWorld() should directly be used instead of fromWorldId(). Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ==========
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ==========
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ==========
nhiroki@chromium.org changed reviewers: + haraken@chromium.org, peria@chromium.org, yukishiino@chromium.org
PTAL, thanks!
LGTM Thank you for this clean-up. Looks much better!!
LGTM.
LGTM!
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG= ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG=697622, 697629 ==========
Thank you! :)
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...)
The CQ bit was checked by nhiroki@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org, peria@chromium.org, yukishiino@chromium.org Link to the patchset: https://codereview.chromium.org/2753013003/#ps40001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1489748136257650, "parent_rev": "663bdb216fc90132e85a40649d8c04c62cbf29bb", "commit_rev": "1d85fa7d0be347292a5805ec87ca3d2d10a8c57f"}
Message was sent while issue was closed.
Description was changed from ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG=697622, 697629 ========== to ========== Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup This CL removes DOMWrapperWorld::fromWorldId() that looks like a simple getter but actually has a side effect like this: 1) When a given id is for the main world, ensures the main world and returns it. 2) When a given id is for an isolated world, ensures the isolated world and returns it. 3) Otherwise, looks up a given id in the world map and then returns the finding. If the world doesn't exist, returns nullptr. After this CL, mainWorld() is used for 1) and ensureIsolatedWorld() is used for 2). fromWorldId() hasn't been used for 3), so this CL does not introduce an alternative for the case. Also, this CL pushes the main world into the world map for cleanup. Before this CL, the main world is managed separately from other worlds. Managing all worlds in the single map would be simpler. BUG=697622, 697629 Review-Url: https://codereview.chromium.org/2753013003 Cr-Commit-Position: refs/heads/master@{#457739} Committed: https://chromium.googlesource.com/chromium/src/+/1d85fa7d0be347292a5805ec87ca... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/1d85fa7d0be347292a5805ec87ca... |