Closed Bug 1348464 Opened 7 years ago Closed 7 years ago

Avoid two virtual calls in NS_URIChainHasFlags()

Categories

(Core :: Networking, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: bagder)

References

Details

(Whiteboard: [necko-active])

Attachments

(2 files)

      No description provided.
Assignee: nobody → ehsan
Blocks: 1347376
Attachment #8848690 - Flags: review?(mcmanus) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a034f667da3b
Avoid two virtual calls in NS_URIChainHasFlags(); r=mcmanus
I backed this out because it leaked the world!

https://hg.mozilla.org/integration/mozilla-inbound/rev/ed933de5aa163ee108fa894b6367cebbe1bbd0a6

Turns out that nsIOService::GetInstance() addrefs the raw pointer it returns.  Great!
Attachment #8848820 - Flags: review?(mcmanus) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4258769b457d
Part 0: Make nsIOService::GetInstance() a simple inline function that returns a plain pointer; r=mcmanus
https://hg.mozilla.org/integration/mozilla-inbound/rev/b89cd59e4ff6
Part 1: Avoid two virtual calls in NS_URIChainHasFlags(); r=mcmanus
Backed out for crashing in Marionette e10s tests in nsIDocument::GetDocGroup():

https://hg.mozilla.org/integration/mozilla-inbound/rev/d2cfefb8ff3966368090c222e2c26195772ba9b1
https://hg.mozilla.org/integration/mozilla-inbound/rev/d1f0dfefbc3e670df39ec306db1927404bc3a9bb

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b89cd59e4ff6185266b496978c2bd1f56dc2cf68&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=85340454&repo=mozilla-inbound

06:59:58     INFO - TEST-START | test_navigation.py TestNavigate.test_get_current_url_returns_top_level_browsing_context_url
07:00:02     INFO - TEST-PASS | test_navigation.py TestNavigate.test_get_current_url_returns_top_level_browsing_context_url | took 3122ms
07:00:02     INFO - mozcrash Downloading symbols from: https://queue.taskcluster.net/v1/task/IjZSil2FQi2q1kRA0GNVjA/artifacts/public/build/target.crashreporter-symbols.zip
07:00:08     INFO - mozcrash Copy/paste: /builds/slave/test/build/macosx64-minidump_stackwalk /var/folders/s7/5fc64b65217gh236xtt4c1sr00000w/T/tmp73z1g8.mozrunner/minidumps/2905F3A0-EF23-4A4D-AC72-307B8A76FD23.dmp /var/folders/s7/5fc64b65217gh236xtt4c1sr00000w/T/tmpyals_H
07:00:22     INFO - mozcrash Saved minidump as /builds/slave/test/build/blobber_upload_dir/2905F3A0-EF23-4A4D-AC72-307B8A76FD23.dmp
07:00:22     INFO - mozcrash Saved app info as /builds/slave/test/build/blobber_upload_dir/2905F3A0-EF23-4A4D-AC72-307B8A76FD23.extra
07:00:22     INFO - PROCESS-CRASH | marionette.py | application crashed [@ nsIDocument::GetDocGroup() const]
07:00:22     INFO - Crash dump filename: /var/folders/s7/5fc64b65217gh236xtt4c1sr00000w/T/tmp73z1g8.mozrunner/minidumps/2905F3A0-EF23-4A4D-AC72-307B8A76FD23.dmp
07:00:22     INFO - Operating system: Mac OS X
07:00:22     INFO -                   10.10.5 14F27
07:00:22     INFO - CPU: amd64
07:00:22     INFO -      family 6 model 69 stepping 1
07:00:22     INFO -      4 CPUs
07:00:22     INFO - 
07:00:22     INFO - GPU: UNKNOWN
07:00:22     INFO - 
07:00:22     INFO - Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
07:00:22     INFO - Crash address: 0x0
07:00:22     INFO - Process uptime: 11 seconds
07:00:22     INFO - 
07:00:22     INFO - Thread 0 (crashed)
07:00:22     INFO -  0  XUL!nsIDocument::GetDocGroup() const [nsDocument.cpp:b89cd59e4ff6 : 2971 + 0x0]
07:00:22     INFO -     rax = 0x0000000000000000   rdx = 0x00007fff7c9f31f8
07:00:22     INFO -     rcx = 0x0000000000000000   rbx = 0x00000001162a98a8
07:00:22     INFO -     rsi = 0x0000610000006100   rdi = 0x0000600000006103
07:00:22     INFO -     rbp = 0x00007fff5f996160   rsp = 0x00007fff5f9960e0
07:00:22     INFO -      r8 = 0x00007fff5f996090    r9 = 0x00007fff7c67a300
07:00:22     INFO -     r10 = 0x0000000100268e90   r11 = 0x0000000100268e50
07:00:22     INFO -     r12 = 0x000000010545526d   r13 = 0x0000000115ab8450
07:00:22     INFO -     r14 = 0x00007fff5f996100   r15 = 0x00000001166843d0
07:00:22     INFO -     rip = 0x0000000101851d25
07:00:22     INFO -     Found by: given as instruction pointer in context
07:00:22     INFO -  1  XUL!nsGlobalWindow::Dispatch(char const*, mozilla::TaskCategory, already_AddRefed<nsIRunnable>&&) [nsGlobalWindow.cpp:b89cd59e4ff6 : 14971 + 0x5]
07:00:22     INFO -     rbx = 0x0000000116644000   rbp = 0x00007fff5f996190
07:00:22     INFO -     rsp = 0x00007fff5f996170   r12 = 0x000000010545526d
07:00:22     INFO -     r13 = 0x0000000115ab8450   r14 = 0x00007fff5f9961a8
07:00:22     INFO -     r15 = 0x0000000000000007   rip = 0x000000010171ab8e
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  2  XUL!nsGlobalWindow::NotifyWindowIDDestroyed(char const*) [nsGlobalWindow.cpp:b89cd59e4ff6 : 9575 + 0x16]
07:00:22     INFO -     rbx = 0x000000010a5270b0   rbp = 0x00007fff5f9961d0
07:00:22     INFO -     rsp = 0x00007fff5f9961a0   r12 = 0x0000000115ab8450
07:00:22     INFO -     r13 = 0x0000000115ab8450   r14 = 0x0000000116644000
07:00:22     INFO -     r15 = 0x000000010171ab60   rip = 0x00000001016de473
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  3  XUL!nsGlobalWindow::FreeInnerObjects() [nsGlobalWindow.cpp:b89cd59e4ff6 : 2109 + 0xf]
07:00:22     INFO -     rbx = 0x0000000000000000   rbp = 0x00007fff5f996210
07:00:22     INFO -     rsp = 0x00007fff5f9961e0   r12 = 0x0000000115ab8450
07:00:22     INFO -     r13 = 0x0000000115ab8450   r14 = 0x0000000116644040
07:00:22     INFO -     r15 = 0x0000000116644000   rip = 0x00000001016de16b
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  4  XUL!WindowStateHolder::~WindowStateHolder() [nsGlobalWindow.cpp:b89cd59e4ff6 : 2668 + 0x5]
07:00:22     INFO -     rbx = 0x000000011914b800   rbp = 0x00007fff5f996230
07:00:22     INFO -     rsp = 0x00007fff5f996220   r12 = 0x00000001164e7c40
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000000
07:00:22     INFO -     r15 = 0x000000011649a948   rip = 0x00000001016e1fd1
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  5  XUL!WindowStateHolder::Release() [nsGlobalWindow.cpp:b89cd59e4ff6 : 2661 + 0x8]
07:00:22     INFO -     rbx = 0x000000011914b800   rbp = 0x00007fff5f996250
07:00:22     INFO -     rsp = 0x00007fff5f996240   r12 = 0x00000001164e7c40
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000000
07:00:22     INFO -     r15 = 0x000000011649a948   rip = 0x00000001016e213e
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  6  XUL!nsSHEntryShared::DropPresentationState() [nsCOMPtr.h:b89cd59e4ff6 : 334 + 0x9]
07:00:22     INFO -     rbx = 0x000000011914b800   rbp = 0x00007fff5f996290
07:00:22     INFO -     rsp = 0x00007fff5f996260   r12 = 0x00000001164e7c40
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x00000001164e7cb8
07:00:22     INFO -     r15 = 0x000000011649a948   rip = 0x00000001041dda16
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  7  XUL!nsSHEntryShared::RemoveFromBFCacheSync() [nsSHEntryShared.cpp:b89cd59e4ff6 : 240 + 0x8]
07:00:22     INFO -     rbx = 0x00000001164e7cb8   rbp = 0x00007fff5f9962c0
07:00:22     INFO -     rsp = 0x00007fff5f9962a0   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x00000001164e7c40
07:00:22     INFO -     r15 = 0x0000000000000003   rip = 0x00000001041dc9e7
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  8  XUL!nsSHEntryShared::~nsSHEntryShared() [nsSHEntryShared.cpp:b89cd59e4ff6 : 105 + 0x8]
07:00:22     INFO -     rbx = 0x00000001191c22e0   rbp = 0x00007fff5f996300
07:00:22     INFO -     rsp = 0x00007fff5f9962d0   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x00000001164e7c40
07:00:22     INFO -     r15 = 0x0000000000000003   rip = 0x00000001041dd3af
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO -  9  XUL!nsSHEntryShared::Release() [nsSHEntryShared.cpp:b89cd59e4ff6 : 88 + 0x8]
07:00:22     INFO -     rbx = 0x00000001164e7c40   rbp = 0x00007fff5f996320
07:00:22     INFO -     rsp = 0x00007fff5f996310   r12 = 0x000000010d030640
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000000
07:00:22     INFO -     r15 = 0x000000010d030018   rip = 0x00000001041dd62e
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 10  XUL!mozilla::SegmentedVector<nsCOMPtr<nsISupports>, 4096ul, mozilla::MallocAllocPolicy>::SegmentImpl<509ul>::~SegmentImpl() [nsCOMPtr.h:b89cd59e4ff6 : 294 + 0xa]
07:00:22     INFO -     rbx = 0x00000000000000c5   rbp = 0x00007fff5f996350
07:00:22     INFO -     rsp = 0x00007fff5f996330   r12 = 0x000000010d030640
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x000000010d030000
07:00:22     INFO -     r15 = 0x000000010d030018   rip = 0x00000001005a047a
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 11  XUL!mozilla::SegmentedVector<nsCOMPtr<nsISupports>, 4096ul, mozilla::MallocAllocPolicy>::PopLastN(unsigned int) [SegmentedVector.h:b89cd59e4ff6 : 63 + 0x8]
07:00:22     INFO -     rbx = 0x00000000000001fd   rbp = 0x00007fff5f996390
07:00:22     INFO -     rsp = 0x00007fff5f996360   r12 = 0x000000010d030000
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000bee
07:00:22     INFO -     r15 = 0x00000001166a7600   rip = 0x00000001005a02ac
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 12  XUL!mozilla::dom::DeferredFinalizerImpl<nsISupports>::DeferredFinalize(unsigned int, void*) [BindingUtils.h:b89cd59e4ff6 : 2801 + 0xb]
07:00:22     INFO -     rbx = 0x0000000000000c8a   rbp = 0x00007fff5f9963c0
07:00:22     INFO -     rsp = 0x00007fff5f9963a0   r12 = 0x000000010a53abc0
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000c8a
07:00:22     INFO -     r15 = 0x00000001166a7600   rip = 0x0000000100596f8d
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 13  XUL!mozilla::IncrementalFinalizeRunnable::ReleaseNow(bool) [CycleCollectedJSContext.cpp:b89cd59e4ff6 : 1620 + 0x7]
07:00:22     INFO -     rbx = 0x000000010a53ac00   rbp = 0x00007fff5f996410
07:00:22     INFO -     rsp = 0x00007fff5f9963d0   r12 = 0x000000010a53abc0
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000006ddc2ba83d
07:00:22     INFO -     r15 = 0x000000010a53abc0   rip = 0x00000001005979eb
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 14  XUL!mozilla::CycleCollectedJSContext::FinalizeDeferredThings(mozilla::CycleCollectedJSContext::DeferredFinalizeType) [CycleCollectedJSContext.cpp:b89cd59e4ff6 : 1693 + 0x7]
07:00:22     INFO -     rbx = 0x0000000106e16000   rbp = 0x00007fff5f996450
07:00:22     INFO -     rsp = 0x00007fff5f996420   r12 = 0x0000000106e16168
07:00:22     INFO -     r13 = 0x0000000106e16198   r14 = 0x0000000000000001
07:00:22     INFO -     r15 = 0x000000010a53abc0   rip = 0x0000000100597da2
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 15  XUL!mozilla::CycleCollectedJSContext::OnGC(JSGCStatus) [CycleCollectedJSContext.cpp:b89cd59e4ff6 : 1738 + 0x8]
07:00:22     INFO -     rbx = 0x0000000106e16000   rbp = 0x00007fff5f996490
07:00:22     INFO -     rsp = 0x00007fff5f996460   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x000000010a616698   r14 = 0x0000000000000001
07:00:22     INFO -     r15 = 0x0000000106a93608   rip = 0x0000000100595995
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 16  XUL!js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) [jsgc.cpp:b89cd59e4ff6 : 1359 + 0xb]
07:00:22     INFO -     rbx = 0x000000010a620000   rbp = 0x00007fff5f996570
07:00:22     INFO -     rsp = 0x00007fff5f9964a0   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x000000010a616698   r14 = 0x0000000100594300
07:00:22     INFO -     r15 = 0x0000000106a93608   rip = 0x0000000104cfe4f4
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 17  XUL!js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) [jsgc.cpp:b89cd59e4ff6 : 6506 + 0x15]
07:00:22     INFO -     rbx = 0x0000000106a93608   rbp = 0x00007fff5f996650
07:00:22     INFO -     rsp = 0x00007fff5f996580   r12 = 0x000000010a6189d5
07:00:22     INFO -     r13 = 0x000000010a616698   r14 = 0x0000000000000032
07:00:22     INFO -     r15 = 0x000000010a616000   rip = 0x0000000104cff314
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 18  XUL!JS::GCForReason(JSContext*, JSGCInvocationKind, JS::gcreason::Reason) [jsgc.cpp:b89cd59e4ff6 : 6572 + 0x33]
07:00:22     INFO -     rbx = 0x000000010a616000   rbp = 0x00007fff5f9966c0
07:00:22     INFO -     rsp = 0x00007fff5f996660   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x000000010a56e000   r14 = 0x0000000000000032
07:00:22     INFO -     r15 = 0x000000010a616698   rip = 0x0000000104d042ae
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 19  XUL!nsCycleCollector::FixGrayBits(bool, TimeLog&) [nsCycleCollector.cpp:b89cd59e4ff6 : 3524 + 0x8]
07:00:22     INFO -     rbx = 0x00000000ffffffff   rbp = 0x00007fff5f9966f0
07:00:22     INFO -     rsp = 0x00007fff5f9966d0   r12 = 0x000000010a56e000
07:00:22     INFO -     r13 = 0x000000010a56e000   r14 = 0x0000000000000032
07:00:22     INFO -     r15 = 0x000000010a56e0c0   rip = 0x00000001005a8edd
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 20  XUL!nsCycleCollector::BeginCollection(ccType, nsICycleCollectorListener*) [nsCycleCollector.cpp:b89cd59e4ff6 : 3834 + 0xf]
07:00:22     INFO -     rbx = 0x000000010a56e001   rbp = 0x00007fff5f996750
07:00:22     INFO -     rsp = 0x00007fff5f996700   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x000000010a56e000   r14 = 0x0000000000000002
07:00:22     INFO -     r15 = 0x000000010a56e0c0   rip = 0x00000001005a984e
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 21  XUL!nsCycleCollector::Collect(ccType, js::SliceBudget&, nsICycleCollectorListener*, bool) [nsCycleCollector.cpp:b89cd59e4ff6 : 3661 + 0xf]
07:00:22     INFO -     rbx = 0x000000010a56e000   rbp = 0x00007fff5f9967d0
07:00:22     INFO -     rsp = 0x00007fff5f996760   r12 = 0x00007fff5f9967e0
07:00:22     INFO -     r13 = 0x00007fff5f996801   r14 = 0x00000001005a96b4
07:00:22     INFO -     r15 = 0x0000000000000000   rip = 0x00000001005a9475
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 22  XUL!nsCycleCollector::ShutdownCollect() [nsCycleCollector.cpp:b89cd59e4ff6 : 3602 + 0x15]
07:00:22     INFO -     rbx = 0x00007fff5f9967e0   rbp = 0x00007fff5f996810
07:00:22     INFO -     rsp = 0x00007fff5f9967e0   r12 = 0x0000000106a926e0
07:00:22     INFO -     r13 = 0x00007fff5f996890   r14 = 0x000000010a56e000
07:00:22     INFO -     r15 = 0x000000010a56e000   rip = 0x00000001005a9294
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 23  XUL!nsCycleCollector_shutdown(bool) [nsCycleCollector.cpp:b89cd59e4ff6 : 3896 + 0x8]
07:00:22     INFO -     rbx = 0x0000000106e126b0   rbp = 0x00007fff5f996850
07:00:22     INFO -     rsp = 0x00007fff5f996820   r12 = 0x0000000106a926e0
07:00:22     INFO -     r13 = 0x00007fff5f996890   r14 = 0x0000000000000001
07:00:22     INFO -     r15 = 0x000000010a56e000   rip = 0x00000001005ab792
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 24  XUL!mozilla::ShutdownXPCOM(nsIServiceManager*) [XPCOMInit.cpp:b89cd59e4ff6 : 990 + 0xa]
07:00:22     INFO -     rbx = 0x0000000000000000   rbp = 0x00007fff5f9968c0
07:00:22     INFO -     rsp = 0x00007fff5f996860   r12 = 0x0000000106e8aa00
07:00:22     INFO -     r13 = 0x00007fff5f996890   r14 = 0x00007fff5f996877
07:00:22     INFO -     r15 = 0x00007fff5f996868   rip = 0x0000000100671fdb
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 25  XUL!XRE_TermEmbedding() [nsEmbedFunctions.cpp:b89cd59e4ff6 : 224 + 0x7]
07:00:22     INFO -     rbx = 0x0000000106a93108   rbp = 0x00007fff5f9968e0
07:00:22     INFO -     rsp = 0x00007fff5f9968d0   r12 = 0x0000000000000003
07:00:22     INFO -     r13 = 0x00007fff5f996c28   r14 = 0x0000000000000012
07:00:22     INFO -     r15 = 0x0000000080004005   rip = 0x00000001045e4021
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 26  XUL!mozilla::ipc::ScopedXREEmbed::Stop() [ScopedXREEmbed.cpp:b89cd59e4ff6 : 117 + 0x5]
07:00:22     INFO -     rbx = 0x0000000106eb4938   rbp = 0x00007fff5f996900
07:00:22     INFO -     rsp = 0x00007fff5f9968f0   r12 = 0x0000000000000003
07:00:22     INFO -     r13 = 0x00007fff5f996c28   r14 = 0x0000000000000012
07:00:22     INFO -     r15 = 0x0000000080004005   rip = 0x0000000100be79c3
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 27  XUL!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp:b89cd59e4ff6 : 690 + 0x6]
07:00:22     INFO -     rbx = 0x0000000000000001   rbp = 0x00007fff5f996bc0
07:00:22     INFO -     rsp = 0x00007fff5f996910   r12 = 0x0000000000000003
07:00:22     INFO -     r13 = 0x00007fff5f996c28   r14 = 0x0000000000000012
07:00:22     INFO -     r15 = 0x0000000080004005   rip = 0x00000001045e4ba3
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 28  plugin-container!main [plugin-container.cpp:b89cd59e4ff6 : 64 + 0x13]
07:00:22     INFO -     rbx = 0x0000000106e34188   rbp = 0x00007fff5f996c00
07:00:22     INFO -     rsp = 0x00007fff5f996bd0   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x00007fff5f996c28
07:00:22     INFO -     r15 = 0x0000000000000015   rip = 0x0000000100268ee9
07:00:22     INFO -     Found by: call frame info
07:00:22     INFO - 29  plugin-container!start + 0x34
07:00:22     INFO -     rbx = 0x0000000000000000   rbp = 0x00007fff5f996c18
07:00:22     INFO -     rsp = 0x00007fff5f996c10   r12 = 0x0000000000000000
07:00:22     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000000000000
07:00:22     INFO -     r15 = 0x0000000000000000   rip = 0x0000000100268e84
07:00:22     INFO -     Found by: call frame info
Flags: needinfo?(ehsan)
Patrick, is there someone on the Necko team who can help finish this?  This was a weekend project and I can't really justify spending more time on this.  :(  It's probably a WONTFIX at this point since my time is probably better spent fixing other things than hunting down this test failure.  (Sorry, I know this is a crappy way to behave, but I'm *really* pressed on time these days...)
Flags: needinfo?(ehsan) → needinfo?(mcmanus)
jason does management :) this certainly seems like something valuable that can be pushed over the finish line to me...
Flags: needinfo?(mcmanus) → needinfo?(jduell.mcbugs)
Whiteboard: [necko-active]
Thanks very much.  I owe whoever finishes this a drink of their choice the next time I'm in the same room with them.  :-)
Assignee: ehsan → nobody
Daniel--can you take a look at this?  It's blocking a Quantum flow bug, so higher priority than it might seem.
Flags: needinfo?(jduell.mcbugs) → needinfo?(daniel)
Assignee: nobody → daniel
Flags: needinfo?(daniel)
Gah, this is certainly more complicated than it looks and after having tried out several different approaches I'm questioning how much effort this is worth. I tried both refcounted and non-refcounted approaches and both repeated leaks/crashes as Ehsan mentioned above. I also tried to manually NS_RELEASE() in this specific method but that too runs into that assert for GetDocGroup().

If we're continuing down this path, I think we need to start out by scrutinizing that (debug-build only) assert in nsDocument.cpp.

Ehsan, do you see a significant enough improvement here that you think warrant bringing out the shovel for this? To save Ehsan a needinfo I'm redirecting it to you Jason. Any suggestion on where to go next here?
Flags: needinfo?(jduell.mcbugs)
Whiteboard: [necko-active] → [necko-active][qf]
This seems like a lot of work to save 2 virtual function calls.  Ehsan, are you Ok with WONTFIXing this?

(On the other end of the spectrum, if NS_URIChainHasFlags is actually getting called in such a tight loop that we do want to fix this, we might consider making it an inline function in nsNetUtil.h)
Flags: needinfo?(jduell.mcbugs) → needinfo?(ehsan)
Whiteboard: [necko-active][qf] → [necko-active][qf:p1]
(In reply to Jason Duell [:jduell] (needinfo me) from comment #12)
> This seems like a lot of work to save 2 virtual function calls.  Ehsan, are
> you Ok with WONTFIXing this?

Yeah, I guess.  This leaves a sour taste but we have bigger fish to fry.  :-)

> (On the other end of the spectrum, if NS_URIChainHasFlags is actually
> getting called in such a tight loop that we do want to fix this, we might
> consider making it an inline function in nsNetUtil.h)

Yeah.  Also, Necko is ripe for some serious deCOMtamination work, one issue here or there isn't a big deal but long term we should try to think about reducing usage of abstractions that incur runtime overhead (such as over-usage of virtual functions, over-allocating memory, things that prevent inlining, etc.)  But not something we need to work on right now.

Thanks for taking a look at this, Daniel, and sorry to have wasted your time. :/
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(ehsan)
Resolution: --- → WONTFIX
Whiteboard: [necko-active][qf:p1] → [necko-active]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: