RESOLVED CONFIGURATION CHANGED53868
fast/notifications/notifications-document-close-crash.html fails and flakes after r77738
https://bugs.webkit.org/show_bug.cgi?id=53868
Summary fast/notifications/notifications-document-close-crash.html fails and flakes a...
Robert Hogan
Reported 2011-02-06 02:42:03 PST
Fails after http://trac.webkit.org/changeset/77738 -CONSOLE MESSAGE: line 36: INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. +CONSOLE MESSAGE: line 36: TypeError: Type error PASS Failure is because of: JSValue JSNotificationCenter::requestPermission(ExecState* exec) { ScriptExecutionContext* context = impl()->scriptExecutionContext(); // Make sure that script execution context is valid. if (!context) { setDOMException(exec, INVALID_STATE_ERR); return jsUndefined(); } <..> if (!exec->argument(0).isObject()) return throwTypeError(exec); } 'context' above used to be a local copy of ActiveDomObject::scriptExecutionContext() but is now the scriptExectionContext() (an upcast of Document) for the page's Document object. On Qt, apparently unlike other platforms, this context object is not destroyed by the time the test calls requestPermission(), so instead Qt fails in the above function at 'if (!exec->argument(0).isObject())' instead. Not clear to me why this is happening only for Qt, so skipping for now.
Attachments
Robert Hogan
Comment 1 2011-02-06 02:47:19 PST
Robert Hogan
Comment 2 2011-02-06 02:49:14 PST
Reopening for fix.
WebKit Review Bot
Comment 3 2011-02-06 05:46:17 PST
http://trac.webkit.org/changeset/77764 might have broken Leopard Intel Release (Tests) The following tests are not passing: platform/mac/fast/AppleScript/date.html
Robert Hogan
Comment 4 2011-02-10 14:14:19 PST
This test is flaky on Chromium now. Until r77738 the test could depend on the ScriptExecutionContext being null because NotificationCenter held a local copy which got nulled on NotificationCenter::disconnectFrame(). Now NotificationCenter will return a valid ScriptExecutionContext until the Document/ScriptExecutionContext the DomWindow originally associated it with is destroyed. I believe the reason Qt is now failing on 'if (!exec->argument(0).isObject())' instead is because 'script()->clearScriptObjects();' has been called in 'void Frame::pageDestroyed()' on the way to calling NotificationCenter::disconnectFrame(). So any crash is still safely avoided. Unless there's a good reason to expect the Document/ScriptExecutionContext to be destroyed by the time notification.RequestPermission() is called in the test the new result is valid. Can anyone point to why it should be destroyed by that time?
Ahmad Saleem
Comment 6 2024-02-18 16:49:28 PST
Test is gone with - https://github.com/WebKit/WebKit/commit/34d6c0d0c6a163321646de3e58e9e2dee5f9d739 Nothing to do it - it was for legacy Notifications.
Note You need to log in before you can comment on or make changes to this bug.