Closed Bug 1039165 Opened 10 years ago Closed 10 years ago

Loading a page with an <iframe> triggers WARNING: NS_ENSURE_TRUE(nsContentUtils::GetCurrentJSContext()) failed: file docshell/base/nsDocShell.cpp, line 8687

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

STR: 1. Load any page with an <iframe> in a debug build. e.g.: data:text/html,<iframe src="data:text/html,hi"> 2. Inspect your terminal output. ACTUAL RESULTS: Several warnings, including: { WARNING: NS_ENSURE_TRUE(nsContentUtils::GetCurrentJSContext()) failed: file docshell/base/nsDocShell.cpp, line 8687 } Link to source: > 8684 // Note - The check for a current JSContext here isn't necessarily sensical. > 8685 // It's just designed to preserve the old semantics during a mass-conversion > 8686 // patch. > 8687 NS_ENSURE_TRUE(nsContentUtils::GetCurrentJSContext(), NS_OK); http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp?rev=999d34774ff6#8684 Given that this is triggered in the very-normal situation of an <iframe>, we should perhaps convert the NS_ENSURE_TRUE into an equivalent expression without the warning-spam.
Summary: WARNING: NS_ENSURE_TRUE(nsContentUtils::GetCurrentJSContext()) failed: file docshell/base/nsDocShell.cpp, line 8687 → Loading a page with an <iframe> triggers WARNING: NS_ENSURE_TRUE(nsContentUtils::GetCurrentJSContext()) failed: file docshell/base/nsDocShell.cpp, line 8687
Attached file testcase 1 (deleted) —
bholley, I believe you added this NS_ENSURE_TRUE in bug 997987. Do you think it can/should be relaxed to a simple check-and-return? (without the warning) (This causes a lot of warning-spew during my reftest runs -- one warning per <iframe>, which is a bit messy to sift through.)
Blocks: 997987
Flags: needinfo?(bobbyholley)
(In reply to Daniel Holbert [:dholbert] from comment #2) > bholley, I believe you added this NS_ENSURE_TRUE in bug 997987. Do you think > it can/should be relaxed to a simple check-and-return? (without the warning) Sure. r=me
Flags: needinfo?(bobbyholley)
Assignee: nobody → dholbert
OS: Linux → All
Hardware: x86_64 → All
Thanks! Landed a simple patch to make that change, w/ r=bholley granted in comment 3: https://hg.mozilla.org/integration/mozilla-inbound/rev/7cd551e7aa2a
Flags: in-testsuite-
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: