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.
Committed r77764: <http://trac.webkit.org/changeset/77764>
Reopening for fix.
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
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?
Re-titling bug since the crash affects Chromium too (and perhaps other platforms): http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fnotifications%2Fnotifications-document-close-crash.html&showExpectations=true&group=%40ToT%20-%20chromium.org
Test is gone with - https://github.com/WebKit/WebKit/commit/34d6c0d0c6a163321646de3e58e9e2dee5f9d739 Nothing to do it - it was for legacy Notifications.