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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp

Issue 2808093002: v8binding: Removes WindowProxy::GlobalDetachmentBehavior. (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
index 92e7bc69bc1f686344b44c14c19836db2c87cd8f..74c90d25edaa45687aa49aa7c31fab60ad3dac3c 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
@@ -49,11 +49,15 @@ RemoteWindowProxy::RemoteWindowProxy(v8::Isolate* isolate,
RefPtr<DOMWrapperWorld> world)
: WindowProxy(isolate, frame, std::move(world)) {}
-void RemoteWindowProxy::DisposeContext(GlobalDetachmentBehavior behavior) {
+void RemoteWindowProxy::DisposeContext(Lifecycle next_status) {
+ DCHECK(next_status == Lifecycle::kGlobalObjectIsDetached ||
+ next_status == Lifecycle::kFrameIsDetached);
+
if (lifecycle_ != Lifecycle::kContextIsInitialized)
return;
- if (behavior == kDetachGlobal && !global_proxy_.IsEmpty()) {
+ if (next_status == Lifecycle::kGlobalObjectIsDetached &&
+ !global_proxy_.IsEmpty()) {
global_proxy_.Get().SetWrapperClassId(0);
V8DOMWrapper::ClearNativeInfo(GetIsolate(),
global_proxy_.NewLocal(GetIsolate()));
@@ -63,8 +67,7 @@ void RemoteWindowProxy::DisposeContext(GlobalDetachmentBehavior behavior) {
}
DCHECK_EQ(lifecycle_, Lifecycle::kContextIsInitialized);
- lifecycle_ = behavior == kDetachGlobal ? Lifecycle::kGlobalObjectIsDetached
- : Lifecycle::kFrameIsDetached;
+ lifecycle_ = next_status;
}
void RemoteWindowProxy::Initialize() {

Powered by Google App Engine
This is Rietveld 408576698