Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 822453002: Introduce HostID and de-couple Extensions from "script injection System" [browser side] (Closed)

Created:
6 years ago by Xi Han
Modified:
5 years, 11 months ago
Reviewers:
Fady Samuel, Devlin
CC:
chromium-reviews, darin-cc_chromium.org, jam, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce HostID and de-couple Extensions from "script injection System" [browser side] The major refactor includes: - Introduce HostID (a pair of |id, type|) to replace extension_id in browser side. - Abstract UserScriptLoader to be a base class, and introduces a derived class ExtensionUserScriptLoader which is responsible for loading user scripts for extensions. - In DeclarativeUserScriptManager, a master is created per extension/webUI. - DeclarativeUserScriptManager becomes an ExtensionRegistryObserver and is responsible for clearing scripts for master objects when receive OnExensionUnloaded event. BUG=437566 Committed: https://crrev.com/b88fe3dc1072501bdd105fd95a8b3bc453fd2aa7 Cr-Commit-Position: refs/heads/master@{#313402}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : gn #

Total comments: 2

Patch Set 4 : nits #

Total comments: 20

Patch Set 5 : Change ConsumerID from struct to class. #

Patch Set 6 : format #

Total comments: 18

Patch Set 7 : Fady's comments. #

Total comments: 4

Patch Set 8 : Introduce ConsumerIDFactory #

Total comments: 4

Patch Set 9 : Remove ConsumerIDFactory #

Total comments: 8

Patch Set 10 : Clean up. #

Patch Set 11 : Devlin's comments #

Patch Set 12 : Fix the test failures. #

Total comments: 76

Patch Set 13 : Change ConsumerID to struct, remove ExtensionDeclarativeUserScriptMaster and avoid passing linked_p… #

Patch Set 14 : Change ConsumerID back to class #

Patch Set 15 : Change ConsumerID to class; remove usages of linked_ptr, and nits. #

Total comments: 76

Patch Set 16 : Another round of comments of Devlin@. #

Total comments: 28

Patch Set 17 : Update the way to assign instance_id when creating ConsumerID and so on. #

Patch Set 18 : Introduce HostID for DeclarativeUserScriptMaser assignment, remove ConsumerID. #

Total comments: 18

Patch Set 19 : Clean up. #

Total comments: 4

Patch Set 20 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+656 lines, -643 lines) Patch
M chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/declarative_content/content_action.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/declarative_content/content_action.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +18 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/declarative_content/content_action_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 14 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_action_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +15 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/convert_user_script.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/declarative_user_script_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +24 lines, -9 lines 0 comments Download
M chrome/browser/extensions/declarative_user_script_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +27 lines, -6 lines 0 comments Download
M chrome/browser/extensions/declarative_user_script_master.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -20 lines 0 comments Download
M chrome/browser/extensions/declarative_user_script_master.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -17 lines 0 comments Download
A chrome/browser/extensions/extension_user_script_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_user_script_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +166 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/extension_user_script_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 16 chunks +42 lines, -30 lines 0 comments Download
M chrome/browser/extensions/shared_user_script_master.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/shared_user_script_master.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/user_script_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +59 lines, -46 lines 0 comments Download
M chrome/browser/extensions/user_script_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 10 chunks +83 lines, -195 lines 0 comments Download
M chrome/browser/extensions/user_script_loader_unittest.cc View 1 chunk +0 lines, -264 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/extensions/manifest_handlers/content_scripts_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/api/declarative/declarative_rule.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +9 lines, -3 lines 0 comments Download
M extensions/browser/api/declarative/declarative_rule_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +24 lines, -17 lines 0 comments Download
M extensions/browser/api/declarative_webrequest/webrequest_action.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/declarative_webrequest/webrequest_action.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/declarative_webrequest/webrequest_rules_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M extensions/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
A extensions/common/host_id.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +39 lines, -0 lines 0 comments Download
M extensions/common/user_script.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +13 lines, -6 lines 0 comments Download
M extensions/common/user_script.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +17 lines, -2 lines 0 comments Download
M extensions/common/user_script_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 63 (22 generated)
Xi Han
Hi Fady: please take a look, thanks!
6 years ago (2014-12-22 20:47:41 UTC) #8
Fady Samuel
https://codereview.chromium.org/822453002/diff/140001/extensions/common/consumer.h File extensions/common/consumer.h (right): https://codereview.chromium.org/822453002/diff/140001/extensions/common/consumer.h#newcode5 extensions/common/consumer.h:5: #ifndef EXTENSIONS_COMMON_CONSUMER_H_ Maybe call this file consumer_id.h? https://codereview.chromium.org/822453002/diff/140001/extensions/common/consumer.h#newcode34 extensions/common/consumer.h:34: ...
6 years ago (2014-12-22 21:48:46 UTC) #9
Xi Han
https://codereview.chromium.org/822453002/diff/140001/extensions/common/consumer.h File extensions/common/consumer.h (right): https://codereview.chromium.org/822453002/diff/140001/extensions/common/consumer.h#newcode5 extensions/common/consumer.h:5: #ifndef EXTENSIONS_COMMON_CONSUMER_H_ On 2014/12/22 21:48:46, Fady Samuel wrote: > ...
6 years ago (2014-12-22 22:58:59 UTC) #11
Fady Samuel
https://codereview.chromium.org/822453002/diff/200001/chrome/browser/extensions/declarative_user_script_manager.cc File chrome/browser/extensions/declarative_user_script_manager.cc (right): https://codereview.chromium.org/822453002/diff/200001/chrome/browser/extensions/declarative_user_script_manager.cc#newcode13 chrome/browser/extensions/declarative_user_script_manager.cc:13: current_instance_id_(ConsumerID::kDefaultInstanceID + 1) { Why? https://codereview.chromium.org/822453002/diff/200001/chrome/browser/extensions/declarative_user_script_master.cc File chrome/browser/extensions/declarative_user_script_master.cc (right): ...
5 years, 11 months ago (2015-01-06 13:55:11 UTC) #12
Xi Han
Hi Fady: PTAL, thanks. https://codereview.chromium.org/822453002/diff/200001/chrome/browser/extensions/declarative_user_script_manager.cc File chrome/browser/extensions/declarative_user_script_manager.cc (right): https://codereview.chromium.org/822453002/diff/200001/chrome/browser/extensions/declarative_user_script_manager.cc#newcode13 chrome/browser/extensions/declarative_user_script_manager.cc:13: current_instance_id_(ConsumerID::kDefaultInstanceID + 1) { On ...
5 years, 11 months ago (2015-01-07 18:57:06 UTC) #14
Fady Samuel
Another set of comments. https://codereview.chromium.org/822453002/diff/260001/chrome/browser/extensions/declarative_user_script_manager.h File chrome/browser/extensions/declarative_user_script_manager.h (right): https://codereview.chromium.org/822453002/diff/260001/chrome/browser/extensions/declarative_user_script_manager.h#newcode53 chrome/browser/extensions/declarative_user_script_manager.h:53: ConsumerID* GenerateConsumerID(const std::string& id); Return ...
5 years, 11 months ago (2015-01-07 19:19:41 UTC) #15
Xi Han
Hi Fady: I would like to add "const" keyword or use scoped_ptr, but they have ...
5 years, 11 months ago (2015-01-07 20:28:43 UTC) #16
Fady Samuel
https://codereview.chromium.org/822453002/diff/280001/chrome/browser/extensions/declarative_user_script_manager.cc File chrome/browser/extensions/declarative_user_script_manager.cc (left): https://codereview.chromium.org/822453002/diff/280001/chrome/browser/extensions/declarative_user_script_manager.cc#oldcode19 chrome/browser/extensions/declarative_user_script_manager.cc:19: DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID( You shouldn't need this. https://codereview.chromium.org/822453002/diff/280001/chrome/browser/extensions/declarative_user_script_manager.h File chrome/browser/extensions/declarative_user_script_manager.h (right): ...
5 years, 11 months ago (2015-01-08 16:12:59 UTC) #17
Xi Han
https://codereview.chromium.org/822453002/diff/280001/chrome/browser/extensions/declarative_user_script_manager.cc File chrome/browser/extensions/declarative_user_script_manager.cc (left): https://codereview.chromium.org/822453002/diff/280001/chrome/browser/extensions/declarative_user_script_manager.cc#oldcode19 chrome/browser/extensions/declarative_user_script_manager.cc:19: DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID( On 2015/01/08 16:12:59, Fady Samuel wrote: > You ...
5 years, 11 months ago (2015-01-08 20:54:11 UTC) #20
Fady Samuel
Getting close. https://codereview.chromium.org/822453002/diff/340001/chrome/browser/extensions/consumer_id_factory.h File chrome/browser/extensions/consumer_id_factory.h (right): https://codereview.chromium.org/822453002/diff/340001/chrome/browser/extensions/consumer_id_factory.h#newcode24 chrome/browser/extensions/consumer_id_factory.h:24: static const ConsumerID& Create(const RequestContentScriptKey& key, If ...
5 years, 11 months ago (2015-01-08 21:03:08 UTC) #21
Xi Han
https://codereview.chromium.org/822453002/diff/340001/chrome/browser/extensions/consumer_id_factory.h File chrome/browser/extensions/consumer_id_factory.h (right): https://codereview.chromium.org/822453002/diff/340001/chrome/browser/extensions/consumer_id_factory.h#newcode24 chrome/browser/extensions/consumer_id_factory.h:24: static const ConsumerID& Create(const RequestContentScriptKey& key, On 2015/01/08 21:03:08, ...
5 years, 11 months ago (2015-01-08 22:46:46 UTC) #22
Fady Samuel
Feel free to add a new reviewer once you address these comments. https://codereview.chromium.org/822453002/diff/360001/extensions/common/consumer.cc File extensions/common/consumer.cc ...
5 years, 11 months ago (2015-01-09 22:07:24 UTC) #23
Xi Han
rdevlin.cronin@chromium.org: Please review all changes. Thanks a lot! https://codereview.chromium.org/822453002/diff/360001/extensions/common/consumer.cc File extensions/common/consumer.cc (right): https://codereview.chromium.org/822453002/diff/360001/extensions/common/consumer.cc#newcode17 extensions/common/consumer.cc:17: ConsumerID::ConsumerID(const ...
5 years, 11 months ago (2015-01-09 22:59:33 UTC) #25
Devlin
Whoa, that's a big patch. First pass. https://codereview.chromium.org/822453002/diff/400001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/400001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode255 chrome/browser/extensions/api/declarative_content/content_action.cc:255: const ConsumerID& ...
5 years, 11 months ago (2015-01-12 16:47:47 UTC) #26
Xi Han
Hi Robert, I accidentally delete the patchset that have your comments and my replies, and ...
5 years, 11 months ago (2015-01-13 17:26:28 UTC) #28
Xi Han
https://codereview.chromium.org/822453002/diff/440001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/440001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode263 chrome/browser/extensions/api/declarative_content/content_action.cc:263: request_content_script_key_to_id_map_.Get(); Store it locally.
5 years, 11 months ago (2015-01-13 17:35:02 UTC) #30
Devlin
On 2015/01/13 17:26:28, Xi Han wrote: > Hi Robert, I accidentally delete the patchset that ...
5 years, 11 months ago (2015-01-14 15:59:26 UTC) #32
Devlin
https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode247 chrome/browser/extensions/api/declarative_content/content_action.cc:247: std::map<RequestContentScriptKey, linked_ptr<ConsumerID>>; ConsumerIDs are cheap enough to copy that ...
5 years, 11 months ago (2015-01-14 16:45:10 UTC) #33
Xi Han
Hi Robert: thanks a lot for your comments. PTAK. https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode247 chrome/browser/extensions/api/declarative_content/content_action.cc:247: ...
5 years, 11 months ago (2015-01-14 23:46:04 UTC) #34
Devlin
https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/480001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode247 chrome/browser/extensions/api/declarative_content/content_action.cc:247: std::map<RequestContentScriptKey, linked_ptr<ConsumerID>>; On 2015/01/14 23:46:02, Xi Han wrote: > ...
5 years, 11 months ago (2015-01-16 17:05:04 UTC) #36
Xi Han
Hi Devlin@: I updated my CL according our discussion offline, and hopefully includes everything. PTAK, ...
5 years, 11 months ago (2015-01-19 22:40:06 UTC) #38
Devlin
Lots more comments, but mostly all nits. This is looking good; great job! :) https://codereview.chromium.org/822453002/diff/580001/chrome/browser/extensions/api/declarative_content/content_action.cc ...
5 years, 11 months ago (2015-01-20 17:51:06 UTC) #39
Xi Han
Hi Devlin@: PTAL, thanks! https://codereview.chromium.org/822453002/diff/580001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/580001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode10 chrome/browser/extensions/api/declarative_content/content_action.cc:10: #include "base/memory/linked_ptr.h" On 2015/01/20 17:51:04, ...
5 years, 11 months ago (2015-01-21 21:30:18 UTC) #41
Devlin
https://codereview.chromium.org/822453002/diff/620001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/822453002/diff/620001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode381 chrome/browser/extensions/api/declarative_content/content_action.cc:381: const RequestKey key(extension->id()); I think the typedef to RequestKey ...
5 years, 11 months ago (2015-01-21 23:25:21 UTC) #42
Xi Han
Hi Devlin@: Thank you for point out to create a master per extension/webui. I realize ...
5 years, 11 months ago (2015-01-22 17:19:37 UTC) #44
Devlin
On 2015/01/22 17:19:37, Xi Han wrote: > Hi Devlin@: Thank you for point out to ...
5 years, 11 months ago (2015-01-22 17:40:54 UTC) #45
Fady Samuel
On 2015/01/22 17:40:54, Devlin wrote: > On 2015/01/22 17:19:37, Xi Han wrote: > > Hi ...
5 years, 11 months ago (2015-01-22 17:43:35 UTC) #46
Devlin
On 2015/01/22 17:43:35, Fady Samuel wrote: > On 2015/01/22 17:40:54, Devlin wrote: > > On ...
5 years, 11 months ago (2015-01-22 17:57:08 UTC) #47
Devlin
> On 2015/01/22 17:43:35, Fady Samuel wrote: > > No, the current model is each ...
5 years, 11 months ago (2015-01-22 17:59:28 UTC) #48
Fady Samuel
On 2015/01/22 17:59:28, Devlin wrote: > > On 2015/01/22 17:43:35, Fady Samuel wrote: > > ...
5 years, 11 months ago (2015-01-22 18:04:13 UTC) #49
Devlin
On 2015/01/22 18:04:13, Fady Samuel wrote: > True, as long as injecting a content script ...
5 years, 11 months ago (2015-01-22 18:12:03 UTC) #50
Xi Han
Hi reviewers: As discussed offline, the isolation of applying content scripts (rules) between <webview>s and ...
5 years, 11 months ago (2015-01-23 21:13:31 UTC) #53
Devlin
On 2015/01/23 21:13:31, Xi Han wrote: > Hi reviewers: > As discussed offline, the isolation ...
5 years, 11 months ago (2015-01-23 21:30:21 UTC) #54
Xi Han
> Changes to simplify the declarative masters SGTM. Will we still need a consumer > ...
5 years, 11 months ago (2015-01-26 19:38:21 UTC) #55
Devlin
You'll also need to update the description of the CL. https://codereview.chromium.org/822453002/diff/720001/chrome/browser/extensions/api/declarative_content/content_action.h File chrome/browser/extensions/api/declarative_content/content_action.h (right): https://codereview.chromium.org/822453002/diff/720001/chrome/browser/extensions/api/declarative_content/content_action.h#newcode71 ...
5 years, 11 months ago (2015-01-26 20:12:09 UTC) #56
Xi Han
https://codereview.chromium.org/822453002/diff/720001/chrome/browser/extensions/api/declarative_content/content_action.h File chrome/browser/extensions/api/declarative_content/content_action.h (right): https://codereview.chromium.org/822453002/diff/720001/chrome/browser/extensions/api/declarative_content/content_action.h#newcode71 chrome/browser/extensions/api/declarative_content/content_action.h:71: const Extension* extension, On 2015/01/26 20:12:08, Devlin wrote: > ...
5 years, 11 months ago (2015-01-26 23:27:53 UTC) #57
Devlin
lgtm with nits. https://codereview.chromium.org/822453002/diff/740001/chrome/browser/extensions/api/declarative_content/content_action.h File chrome/browser/extensions/api/declarative_content/content_action.h (right): https://codereview.chromium.org/822453002/diff/740001/chrome/browser/extensions/api/declarative_content/content_action.h#newcode100 chrome/browser/extensions/api/declarative_content/content_action.h:100: const HostID& host_id, This still kind ...
5 years, 11 months ago (2015-01-27 22:06:39 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/822453002/760001
5 years, 11 months ago (2015-01-27 22:45:43 UTC) #60
commit-bot: I haz the power
Committed patchset #20 (id:760001)
5 years, 11 months ago (2015-01-27 23:39:18 UTC) #61
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/b88fe3dc1072501bdd105fd95a8b3bc453fd2aa7 Cr-Commit-Position: refs/heads/master@{#313402}
5 years, 11 months ago (2015-01-27 23:40:50 UTC) #62
Xi Han
5 years, 10 months ago (2015-02-04 20:41:24 UTC) #63
Message was sent while issue was closed.
A revert of this CL (patchset #20 id:760001) has been created in
https://codereview.chromium.org/899983002/ by hanxi@chromium.org.

The reason for reverting is: It might cause the crash
https://code.google.com/p/chromium/issues/detail?id=454917..

Powered by Google App Engine
This is Rietveld 408576698