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

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

Issue 2798863002: PagePopupController: handle frame-detached window usage. (Closed)
Patch Set: add test 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html ('k') | 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/V8PagePopupControllerBinding.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp
index 85cf4e25d84455899603e10b42942b30cec08008..f9bd956ca85430a02718797a91f2f0211fb1879e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp
@@ -22,9 +22,9 @@ void pagePopupControllerAttributeGetter(
const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
DOMWindow* impl = V8Window::toImpl(holder);
- PagePopupController* cppValue =
- PagePopupSupplement::from(*toLocalDOMWindow(impl)->frame())
- .pagePopupController();
+ PagePopupController* cppValue = nullptr;
+ if (LocalFrame* frame = toLocalDOMWindow(impl)->frame())
+ cppValue = PagePopupSupplement::from(*frame).pagePopupController();
v8SetReturnValue(info, ToV8(cppValue, holder, info.GetIsolate()));
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698