Bug 197300

Summary: ASSERT(scriptExecutionContext()) in Performance::resourceTimingBufferFullTimerFired()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ggaren, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194689
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2019-04-25 16:26:45 PDT
ASSERT(scriptExecutionContext()) in Performance::resourceTimingBufferFullTimerFired():
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
    frame #0: 0x000000055fcc4720 JavaScriptCore`::WTFCrash() at Assertions.cpp:305:35
    frame #1: 0x00000005643abffb WebCore`WTFCrashWithInfo((null)=217, (null)="./page/Performance.cpp", (null)="void WebCore::Performance::resourceTimingBufferFullTimerFired()", (null)=2102) at Assertions.h:566:5
  * frame #2: 0x00000005670259a6 WebCore`WebCore::Performance::resourceTimingBufferFullTimerFired(this=0x0000000593100138) at Performance.cpp:217:5
    frame #3: 0x00000005670362c1 WebCore`decltype(__f=0x0000000583f37c48, __a0=0x0000000583f37c58)).*fp()) std::__1::__invoke<void (WebCore::Performance::*&)(), WebCore::Performance*&, void>(void (WebCore::Performance::*&)(), WebCore::Performance*&) at type_traits:4286:1
    frame #4: 0x0000000567036240 WebCore`std::__1::__bind_return<void (WebCore::Performance::*)(), std::__1::tuple<WebCore::Performance*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::Performance::*)(), std::__1::tuple<WebCore::Performance*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x0000000583f37c48, __bound_args=size=1, (null)=__tuple_indices<0> @ 0x00007ffee6388408, __args=size=0)(), std::__1::tuple<WebCore::Performance*>, 0ul, std::__1::tuple<> >(void (WebCore::Performance::*&)(), std::__1::tuple<WebCore::Performance*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2216:12
    frame #5: 0x00000005670361ec WebCore`std::__1::__bind_return<void (WebCore::Performance::*)(), std::__1::tuple<WebCore::Performance*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::Performance::*)(), std::__1::tuple<WebCore::Performance*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x0000000583f37c48)(), WebCore::Performance*>::operator()<>() at functional:2249:20
    frame #6: 0x0000000567036189 WebCore`WTF::Function<void ()>::CallableWrapper<std::__1::__bind<void (this=0x0000000583f37c40)(), WebCore::Performance*> >::call() at Function.h:102:43
    frame #7: 0x00000005643ad3fa WebCore`WTF::Function<void ()>::operator(this=0x00000005931001f0)() const at Function.h:57:35
    frame #8: 0x000000056444c7e9 WebCore`WebCore::Timer::fired(this=0x00000005931001c8) at Timer.h:126:9
    frame #9: 0x00000005671a9f5a WebCore`WebCore::ThreadTimers::sharedTimerFiredInternal(this=0x0000000583ffd140) at ThreadTimers.cpp:129:23
    frame #10: 0x00000005671b1c61 WebCore`WebCore::ThreadTimers::setSharedTimer(this=0x0000000583ffb1b8)::$_0::operator()() const at ThreadTimers.cpp:69:80
    frame #11: 0x00000005671b1c19 WebCore`WTF::Function<void ()>::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(this=0x0000000583ffb1b0)::$_0>::call() at Function.h:102:43
    frame #12: 0x00000005643ad3fa WebCore`WTF::Function<void ()>::operator(this=0x00000005696ca480)() const at Function.h:57:35
    frame #13: 0x00000005671850e7 WebCore`WebCore::MainThreadSharedTimer::fired(this=0x00000005696ca478) at MainThreadSharedTimer.cpp:83:5
    frame #14: 0x0000000567202bc6 WebCore`WebCore::timerFired((null)=0x00007ffe604001b0, (null)=0x0000000000000000) at MainThreadSharedTimerCF.cpp:74:40
    frame #15: 0x000000055960d3e4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    frame #16: 0x000000055960cff2 CoreFoundation`__CFRunLoopDoTimer + 1026
    frame #17: 0x000000055960c85a CoreFoundation`__CFRunLoopDoTimers + 266
    frame #18: 0x0000000559606efc CoreFoundation`__CFRunLoopRun + 2220
    frame #19: 0x0000000559606302 CoreFoundation`CFRunLoopRunSpecific + 626
    frame #20: 0x0000000109927084 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
    frame #21: 0x0000000109927224 Foundation`-[NSRunLoop(NSRunLoop) run] + 76
    frame #22: 0x000000055acd5c66 libxpc.dylib`_xpc_objc_main + 460
    frame #23: 0x000000055acd810a libxpc.dylib`xpc_main + 143
    frame #24: 0x0000000550655ec7 WebKit`WebKit::XPCServiceMain((null)=1, (null)=0x00007ffee638a808) at XPCServiceMain.mm:147:5
    frame #25: 0x000000055048111b WebKit`::WKXPCServiceMain(argc=1, argv=0x00007ffee638a808) at WKMain.mm:34:12
    frame #26: 0x0000000109874a3e com.apple.WebKit.WebContent.Development`main(argc=1, argv=0x00007ffee638a808) at AuxiliaryProcessMain.cpp:32:12
    frame #27: 0x000000055aa0f541 libdyld.dylib`start + 1
    frame #28: 0x000000055aa0f541 libdyld.dylib`start + 1
(lldb)
Comment 1 Chris Dumez 2019-04-25 16:27:33 PDT
<rdar://problem/49965990>
Comment 2 Chris Dumez 2019-04-25 16:39:12 PDT
Created attachment 368286 [details]
Patch
Comment 3 youenn fablet 2019-04-25 16:48:18 PDT
Comment on attachment 368286 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368286&action=review

> Source/WebCore/ChangeLog:32
> +        Add assertions to to make sure that the member's scriptExecutionContext is in sync with

s/to to/to
Comment 4 Chris Dumez 2019-04-25 16:51:05 PDT
Created attachment 368288 [details]
Patch
Comment 5 WebKit Commit Bot 2019-04-25 18:28:45 PDT
Comment on attachment 368288 [details]
Patch

Clearing flags on attachment: 368288

Committed r244673: <https://trac.webkit.org/changeset/244673>
Comment 6 WebKit Commit Bot 2019-04-25 18:28:47 PDT
All reviewed patches have been landed.  Closing bug.