fix: use webContentsId with contextId together (#13749)

After after using `processId-contextCounter` as contextId, it may happen
that contexts in different WebContents sharing the same renderer process
get the same contextId. Using webContentsId as part of key in
ObjectsRegistry can fix this.
This commit is contained in:
Cheng Zhao 2018-07-24 16:21:38 +09:00 committed by GitHub
parent d7b41462af
commit 3094f62f0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 53 deletions

View file

@ -57,6 +57,9 @@ class RendererClientBase : public content::ContentRendererClient {
private:
std::unique_ptr<PreferencesManager> preferences_manager_;
bool isolated_world_;
// An increasing ID used for indentifying an V8 context in this process.
int next_context_id_ = 0;
};
} // namespace atom