Change default security flags within NetUtil.newChannel()

RESOLVED FIXED in Firefox 45

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ckerschb, Assigned: ckerschb)

Tracking

unspecified
mozilla45
Points:
---

Firefox Tracking Flags

(firefox45 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
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)

Updated

3 years ago
Assignee: nobody → mozilla
Blocks: 1182535
Status: NEW → ASSIGNED
(Assignee)

Comment 1

3 years ago
Created attachment 8688768 [details] [diff] [review]
bug_1225641_change_default_securityflag_netutil.patch
Attachment #8688768 - Flags: review?(jonas)
(Assignee)

Comment 2

3 years ago
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?
(Assignee)

Comment 5

3 years ago
(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

Comment 7

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7e775b3742d9
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.