Chromium Code Reviews| Index: third_party/WebKit/public/web/WebKit.h |
| diff --git a/third_party/WebKit/public/web/WebKit.h b/third_party/WebKit/public/web/WebKit.h |
| index ddb13d9351f33b75946d3c056abd696d147e9d33..13995d6b68b4de69d83efdf1d951aa9b34cd4c13 100644 |
| --- a/third_party/WebKit/public/web/WebKit.h |
| +++ b/third_party/WebKit/public/web/WebKit.h |
| @@ -44,6 +44,19 @@ namespace blink { |
| // non-null and must remain valid until the current thread calls shutdown. |
| BLINK_EXPORT void initialize(Platform*); |
| +// Blink's mojo stuff must be initialized with 2 prerequisites: |
|
blundell
2016/10/18 12:32:11
Ah I see, this is where you added the comment. Gre
|
| +// 1, Mojo edk initialized; |
| +// 2, A message loop is ready for current thread. |
| +// For production code it's sure that above 2 are already fullfilled before |
|
blundell
2016/10/18 12:32:11
This comment strengthens my belief that we should
leonhsl(Using Gerrit)
2016/10/18 14:34:48
Acknowledged.
leonhsl(Using Gerrit)
2016/10/19 08:47:23
Done. Referring the naming practice of other APIs
|
| +// calling blink::initialize(), so the mojo stuff will be initialized along with |
| +// other stuff(platform, core, modules etc.) as well. But this could be no for |
| +// some test codes, when they call blink::initialize() maybe they have not |
| +// gotten Mojo edk or message loop ready yet, maybe they would fullfill the |
| +// above 2 prerequisites later according with their code logic, in such case we |
| +// provide this API to give them another opportunity to initialize the mojo |
| +// stuff, which has been skipped by blink::initialize(). |
|
haraken
2016/10/18 19:39:11
Hmm, would you summarize why you cannot just use i
leonhsl(Using Gerrit)
2016/10/19 08:47:23
Inside Blink, as about the mojo stuff that must be
|
| +BLINK_EXPORT void initializeMojo(); |
| + |
| // Get the V8 Isolate for the main thread. |
| // initialize must have been called first. |
| BLINK_EXPORT v8::Isolate* mainThreadIsolate(); |