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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md

Issue 1567103003: Update V8BindingDesign.md per jochen's comment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md b/third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md
index e02e97c4aca8514e8e819092258940db56f2fa28..f5bb0ce6651eb113933102be85ac4f999924ec89 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md
+++ b/third_party/WebKit/Source/bindings/core/v8/V8BindingDesign.md
@@ -8,8 +8,9 @@ See [V8GCController.md](V8GCController.md) to learn the lifetime management.
## Isolate
-An isolate is a concept of a thread in V8.
-Isolates and threads are in 1:1 relationship.
+An isolate is a concept of a heap in V8.
jochen (gone - plz use gerrit) 2016/01/08 14:09:20 What about an isolate is an instance of V8
haraken 2016/01/08 14:26:49 Done.
+In Blink, isolates and threads are in 1:1 relationship
+(except compositor workers which map multiple worker threads on one isolate).
jochen (gone - plz use gerrit) 2016/01/08 14:09:20 hum, I don't think that's correct, they all share
haraken 2016/01/08 14:26:49 That's just a wording issue. I meant a user-level
One isolate is associated with the main thread.
One isolate is associated with one worker thread.
@@ -106,9 +107,9 @@ and the control returns back to V8 binding, V8 binding pops the context
from the stack. Given that the control between V8 binding and V8 can be nested
(i.e., V8 binding invokes JavaScript, which calls into V8 binding,
which invokes another JavaScript etc), these contexts form a stack.
-The pushing and popping are done by calling v8::Context::Enter() and
-v8::Context::Exit() (or v8::Context::Scope). We call the most recently entered
-context an entered context.
+The pushing and popping are done by any V8 API that takes a context argument
+or by explicitly calling v8::Context::Enter() and v8::Context::Exit().
+We call the most recently entered context an entered context.
In the above example, at the point when func() is running,
the entered context is the context of the main frame
@@ -124,6 +125,10 @@ In summary, the entered context is a context from which the current JavaScript
execution was started. The current context is a context of
the JavaScript function that is currently running.
+There is another special context called a debugger context.
+If a debugger is active, the debugger context may be inserted to
+the context stack.
+
## World
A world is a concept to sandbox DOM wrappers among content scripts of
@@ -193,9 +198,8 @@ The current context of the worker thread never changes.
## DOM wrappers and worlds
-For compatibility reasons (although this is not speced),
-we need to make sure that the same DOM wrapper is returned to JavaScript
-as long as the underlying C++ DOM object is alive.
+For compatibility reasons, we need to make sure that the same DOM wrapper
+is returned to JavaScript as long as the underlying C++ DOM object is alive.
We should not return different DOM wrappers for the same C++ DOM object.
Here is an example:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698