Closed Bug 1225641 Opened 10 years ago Closed 10 years ago

Change default security flags within NetUtil.newChannel()

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

Attachments

(1 file)

Since we are about to start converting callsites within JS to use asyncOpen2() instead of asyncOpen() it's time to change the default within NetUtil.newChannel(). Such a change involves updating the assertions within ::AsyncOpen() as well.
Assignee: nobody → mozilla
Blocks: 1182535
Status: NEW → ASSIGNED
Jonas, ever seen such a compile error for OS X 10.7 opt (also Mulet) [1]? Are we end up mixing Object C and C++? Any suggestions on how to fix? Potentially we could use nsScriptSecurityManager::IsSystemPrincipal() instead of nsContentUtils::IsSystemPrincipal() for OS X. INFO - /builds/slave/try-m64-0000000000000000000000/build/src/image/decoders/icon/mac/nsIconChannelCocoa.mm:270:3: error: unexpected '@' in program INFO - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; INFO - ^ INFO - ../../../../dist/include/nsObjCExceptions.h:218:48: note: expanded from macro 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT' INFO - #define NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT @try { INFO - ^ INFO - 1 error generated. INFO - make[6]: *** [nsIconChannelCocoa.o] Error 1 INFO - make[5]: *** [image/decoders/icon/mac/target] Error 2 [1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=cf56a85e726a
Flags: needinfo?(jonas)
I have no idea how that specific compile error happens. But sure, try calling nsIScriptSecurityManager.IsSystemPrincipal
Flags: needinfo?(jonas)
(In reply to Christoph Kerschbaumer [:ckerschb] from comment #2) > INFO - > /builds/slave/try-m64-0000000000000000000000/build/src/image/decoders/icon/ > mac/nsIconChannelCocoa.mm:270:3: error: unexpected '@' in program .mm files are Objective-C++, which is C++ combined with the Objective-C extensions to C, so that @ shouldn't be unexpected. I notice that nsIconChannelCocoa.mm includes nsObjCExceptions.h, which #undef's "try" and "catch"; maybe the #include order matters?
(In reply to Jed Davis [:jld] from comment #4) > (In reply to Christoph Kerschbaumer [:ckerschb] from comment #2) > > INFO - > > /builds/slave/try-m64-0000000000000000000000/build/src/image/decoders/icon/ > > mac/nsIconChannelCocoa.mm:270:3: error: unexpected '@' in program > > .mm files are Objective-C++, which is C++ combined with the Objective-C > extensions to C, so that @ shouldn't be unexpected. I notice that > nsIconChannelCocoa.mm includes nsObjCExceptions.h, which #undef's "try" and > "catch"; maybe the #include order matters? Thanks Jed, order of inclusions really matters here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=93f95f1606a6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: