| Index: extensions/renderer/script_context_set.h
|
| diff --git a/extensions/renderer/script_context_set.h b/extensions/renderer/script_context_set.h
|
| index 9f47d0ad95dedbec7000e86df79b72eba0e042c8..049d315e9ed10af5116cb3597a34158fc3b3eabe 100644
|
| --- a/extensions/renderer/script_context_set.h
|
| +++ b/extensions/renderer/script_context_set.h
|
| @@ -75,6 +75,12 @@ class ScriptContextSet {
|
|
|
| // Returns the ScriptContext corresponding to the V8 context that created the
|
| // given |object|.
|
| + // Note: The provided |object| may belong to a v8::Context in another frame,
|
| + // as can happen when a parent frame uses an object of an embedded iframe.
|
| + // In this case, there may be no associated ScriptContext, since the child
|
| + // frame can be hosted in another process. Thus, callers of this need to
|
| + // null-check the result (and should also always check whether or not the
|
| + // context has access to the other context).
|
| static ScriptContext* GetContextByObject(const v8::Local<v8::Object>& object);
|
|
|
| // Synchronously runs |callback| with each ScriptContext that belongs to
|
|
|