What is the difference between asyncOpen2() and asyncOpen()

2015-12-07 Thread Philip Chee
I came across Bug 1182535 [tracking bug] change all callsites to
asyncOpen2 instead of asyncOpen

What's the difference and why should I switch?

Can I just do |s/asyncOpen\(/asyncOpen2\(/g| or are there some
subtleties I should be aware of?

Phil

-- 
Philip Chee , 
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: What is the difference between asyncOpen2() and asyncOpen()

2015-12-07 Thread Yonggang Luo
I am also curious about this.

On Tue, Dec 8, 2015 at 1:00 AM, Philip Chee  wrote:

> I came across Bug 1182535 [tracking bug] change all callsites to
> asyncOpen2 instead of asyncOpen
>
> What's the difference and why should I switch?
>
> Can I just do |s/asyncOpen\(/asyncOpen2\(/g| or are there some
> subtleties I should be aware of?
>
> Phil
>
> --
> Philip Chee , 
> http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
> Guard us from the she-wolf and the wolf, and guard us from the thief,
> oh Night, and so be good for us to pass.
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>



-- 
 此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Move mailnews/intl back into gecko-dev and use options to choose disable/enable it.

2015-12-07 Thread Yonggang Luo
Maintain intl in comm source tree is a big burden, and cause
The comm source are tightly coupled with gecko-dev
source tree.

By providing the necessary functional for comm, we can step forward
to removing the building dependencies of comm from gecko-dev source tree.

The Encoding part and the Crypt part is the most complicated part, and not
be able
to move into comm source tree completely, so we may choose an alternative
way to do that,
use prefs to disable it or enable it.

-- 
 此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


The functions that mailnews called from xul.dll, it's that possible to remove them all?

2015-12-07 Thread Yonggang Luo
??0CertVerifier@psm@mozilla@@QAE@W4OcspDownloadConfig@012@W4OcspStrictConfig
@012@W4OcspGetConfig@012@W4PinningMode@012@@Z
??0LoadInfo@mozilla@@QAE@PAVnsIPrincipal@@0PAVnsINode@@IIPAVnsIURI@@@Z
??0nsBufferDecoderSupport@@QAE@I@Z
??0nsEncoderSupport@@QAE@I@Z
??0nsNSSShutDownPreventionLock@@QAE@XZ
??0PipUIContext@@QAE@XZ
??1CryptoTask@mozilla@@MAE@XZ
??1nsBasicEncoder@@MAE@XZ
??1nsBufferDecoderSupport@@UAE@XZ
??1nsEncoderSupport@@UAE@XZ
??1nsMultiTableEncoderSupport@@UAE@XZ
??1nsNSSShutDownPreventionLock@@QAE@XZ
??1nsTableEncoderSupport@@UAE@XZ
??1SharedCertVerifier@psm@mozilla@@IAE@XZ
?_external_GetIOService@services@mozilla@
@YG?AU?$already_AddRefed@VnsIIOServiceXZ
?_external_GetObserverService@services@mozilla@
@YG?AU?$already_AddRefed@VnsIObserverServiceXZ
?_external_GetStringBundleService@services@mozilla@
@YG?AU?$already_AddRefed@VnsIStringBundleServiceXZ
?_external_GetXULChromeRegistryService@services@mozilla@
@YG?AU?$already_AddRefed@VnsIXULChromeRegistryXZ
?AddRef@LoadInfo@mozilla@@UAGKXZ
?AddRef@nsBasicDecoderSupport@@UAGKXZ
?AddRef@nsBasicEncoder@@UAGKXZ
?BaseURI@LoadInfo@mozilla@@UAEPAVnsIURI@@XZ
?Clear@OCSPCache@psm@mozilla@@QAEXXZ
?Convert@nsBufferDecoderSupport@@UAG?AW4nsresult@@PBDPAHPA_W1@Z
?Convert@nsEncoderSupport@@UAG?AW4nsresult@@PB_WPAHPAD1@Z
?ConvertNoBuff@nsEncoderSupport@@MAG?AW4nsresult@@PB_WPAHPAD1@Z
?ConvertNoBuffNoErr@nsMultiTableEncoderSupport@@MAG?AW4nsresult@
@PB_WPAHPAD1@Z
?ConvertNoBuffNoErr@nsTableEncoderSupport@@MAG?AW4nsresult@@PB_WPAHPAD1@Z
?Dispatch@CryptoTask@mozilla@@IAE?AW4nsresult@@PBDI@Z
?FindEncodingForLabel@EncodingUtils@dom@mozilla@@SA_NPBDPAPAD@Z
?Finish@nsEncoderSupport@@UAG?AW4nsresult@@PADPAH@Z
?FinishNoBuff@nsEncoderSupport@@MAG?AW4nsresult@@PADPAH@Z
?forget@nsNSSShutDownList@@SAXPAVnsNSSShutDownObject@@@Z
?GetBaseURI@LoadInfo@mozilla@@UAG?AW4nsresult@@PAPAVnsIURI@@@Z
?GetCharacterForUnMapped@nsBasicDecoderSupport@@UAE_WXZ
?GetContentPolicyType@LoadInfo@mozilla@@UAG?AW4nsresult@@PAI@Z
?GetDefaultCertVerifier@psm@mozilla@@YA?AV?$TemporaryRef@VSharedCertVerifier
@psm@mozilla@@@2@XZ
?GetForceInheritPrincipal@LoadInfo@mozilla@@UAG?AW4nsresult@@PA_N@Z
?GetInnerWindowID@LoadInfo@mozilla@@UAG?AW4nsresult@@PAI@Z
?GetLoadingDocument@LoadInfo@mozilla@@UAG?AW4nsresult@@PAPAVnsIDOMDocument@
@@Z
?GetLoadingPrincipal@LoadInfo@mozilla@@UAG?AW4nsresult@@PAPAVnsIPrincipal@
@@Z
?GetLoadingSandboxed@LoadInfo@mozilla@@UAG?AW4nsresult@@PA_N@Z
?GetMaxLength@nsBufferDecoderSupport@@UAG?AW4nsresult@@PBDHPAH@Z
?GetMaxLength@nsEncoderSupport@@UAG?AW4nsresult@@PB_WHPAH@Z
?GetSecurityFlags@LoadInfo@mozilla@@UAG?AW4nsresult@@PAI@Z
?GetTriggeringPrincipal@LoadInfo@mozilla@@UAG?AW4nsresult@
@PAPAVnsIPrincipal@@@Z
?LoadingNode@LoadInfo@mozilla@@UAEPAVnsINode@@XZ
?LoadingPrincipal@LoadInfo@mozilla@@UAEPAVnsIPrincipal@@XZ
?Now@pkix@mozilla@@YA?AVTime@12@XZ
?NS_NewAdoptingUTF8StringEnumerator@@YA?AW4nsresult@
@PAPAVnsIUTF8StringEnumerator@@PAV?$nsTArray@VnsCString_external@Z
?PokeGC@nsJSContext@@SAXW4Reason@gcreason@JS@@H@Z
?QueryInterface@LoadInfo@mozilla@@UAG?AW4nsresult@@ABUnsID@@PAPAX@Z
?QueryInterface@nsBasicDecoderSupport@@UAG?AW4nsresult@@ABUnsID@@PAPAX@Z
?QueryInterface@nsBasicEncoder@@UAG?AW4nsresult@@ABUnsID@@PAPAX@Z
?Release@LoadInfo@mozilla@@UAGKXZ
?Release@nsBasicDecoderSupport@@UAGKXZ
?Release@nsBasicEncoder@@UAGKXZ
?remember@nsNSSShutDownList@@SAXPAVnsNSSShutDownObject@@@Z
?Reset@nsBufferDecoderSupport@@UAG?AW4nsresult@@XZ
?Reset@nsEncoderSupport@@UAG?AW4nsresult@@XZ
?Run@CryptoTask@mozilla@@EAG?AW4nsresult@@XZ
?SearchPropertyValue@nsUConvPropertySearch@@SA?AW4nsresult@
@QAY02PBDHPBDPAPAD@Z
?SetInputErrorBehavior@nsBasicDecoderSupport@@UAEXH@Z
?SetOutputErrorBehavior@nsEncoderSupport@@UAG?AW4nsresult@
@HPAVnsIUnicharEncoder@@_W@Z
?SupportImageWithMimeType@imgLoader@@SG_NPBDW4AcceptedMimeTypes@@@Z
?TriggeringPrincipal@LoadInfo@mozilla@@UAEPAVnsIPrincipal@@XZ
?VerifyCert@CertVerifier@psm@mozilla@@QAE?AW4_SECStatus@
@PAUCERTCertificateStr@@_JVTime@pkix@3@PAXPBDIPBUSECItemStr
@@PAU?$TypeSpecificScopedPointer@UCERTCertListStr@@@3@PAW4SECOidTag
@@PAW4OCSPStaplingStatus@123@PAW4KeySizeStatus@23@@Z
?virtualDestroyNSSReference@CryptoTask@mozilla@@EAEXXZ
NS_Alloc
NS_CStringCloneData
NS_CStringContainerFinish
NS_CStringContainerInit
NS_CStringContainerInit2
NS_CStringCopy
NS_CStringGetData
NS_CStringGetIsVoid
NS_CStringGetMutableData
NS_CStringSetData
NS_CStringSetDataRange
NS_CStringSetIsVoid
NS_CStringToUTF16
NS_CycleCollectorSuspect3
NS_DebugBreak
NS_Free
NS_GetComponentManager
NS_GetServiceManager
NS_NewNativeLocalFile
NS_Realloc
NS_StringCloneData
NS_StringContainerFinish
NS_StringContainerInit
NS_StringContainerInit2
NS_StringCopy
NS_StringGetData
NS_StringGetMutableData
NS_StringSetData
NS_StringSetDataRange
NS_UTF16ToCString
RegisterWeakMemoryReporter
UnregisterWeakMemoryReporter

-- 
 此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
___
dev-platform mailing list
dev-platform@lists.mozilla.org

Re: FYI: e10s will be enabled in beta 44/45

2015-12-07 Thread Kurt Roeckx

On 2015-12-04 19:43, jmath...@mozilla.com wrote:

On Friday, December 4, 2015 at 11:08:08 AM UTC-6, Armen Zambrano G. wrote:

LastPass bring the browser to a crawl making it almost impossible to
use. If we have users using LastPass on the beta population using e10s
we're going to have a lot of people upset.


Not an issue since initial rollout to beta and release will be to users who do 
not have addons installed.


It said "exclude users who have a large number of addons installed", 
which clearly is different from "users who do not have addons installed".


Is it even possible to have no addons installed?  Firefox installed a 
number of them on it's own without asking me.



Kurt

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: What is the difference between asyncOpen2() and asyncOpen()

2015-12-07 Thread Patrick McManus
..you should be able to just use asyncopen2 - it will do security checks
for you that you may have needed to do outside asyncopen (e.g. csp) and
will reliably deal with things like redirects. :sicking or :ckerschb for
followups.

On Mon, Dec 7, 2015 at 6:00 PM, Philip Chee  wrote:

> I came across Bug 1182535 [tracking bug] change all callsites to
> asyncOpen2 instead of asyncOpen
>
> What's the difference and why should I switch?
>
> Can I just do |s/asyncOpen\(/asyncOpen2\(/g| or are there some
> subtleties I should be aware of?
>
> Phil
>
> --
> Philip Chee , 
> http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
> Guard us from the she-wolf and the wolf, and guard us from the thief,
> oh Night, and so be good for us to pass.
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Move mailnews/intl back into gecko-dev and use options to choose disable/enable it.

2015-12-07 Thread Joshua Cranmer 

On 12/7/2015 11:38 AM, 罗勇刚(Yonggang Luo) wrote:

Maintain intl in comm source tree is a big burden, and cause
The comm source are tightly coupled with gecko-dev
source tree.

By providing the necessary functional for comm, we can step forward
to removing the building dependencies of comm from gecko-dev source tree.

The Encoding part and the Crypt part is the most complicated part, and not
be able
to move into comm source tree completely, so we may choose an alternative
way to do that,
use prefs to disable it or enable it.


The code was removed from mozilla-central because mozilla-central 
explicitly does not want to support UTF-7. I rather suspect that Henri 
Sivonen would outright reject (and I would agree with said rejection!) 
any patch to attempt to move the code back to mozilla-central.


--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: WebUSB

2015-12-07 Thread reillyg
On Thursday, December 3, 2015 at 11:49:32 PM UTC-8, Jonas Sicking wrote:
> On Wed, Dec 2, 2015 at 2:13 PM, Robert O'Callahan  wrote:
> > 1) What I suggested: Whitelist vendor origins for access to their devices
> > and have vendor-hosted pages ("Web drivers"?) expose "safe" API to
> > third-party applications.
> > 2) Design a permissions API that one way or another lets users authorize
> > access to USB devices by third-party applications.
> > 3) Wrap USB devices in Web-exposed believed-to-be-safe standardized APIs
> > built into browsers.
> 
> There's also
> 
> 4) Design a new USB-protocol which enables USB devices to indicate
> that they are "web safe" and which lets the USB device know which
> website is talking to it. Then let the user authorize a website to use
> a given device.
> 
> This is similar to what we did with TCP (through WebSocket), UDP
> (WebRTC) and HTTP (through CORS).
> 
> Except that we'd also have to let the user authorize devices, similar
> to 2. But at least we could design the new protocol such that we can
> give the user enough information to make an informed decision.
> 
> Obviously this has the dramatic downside that it leaves all existing
> USB devices behind and doesn't provide a solution for them. But that's
> similar to what we did for TCP/UDP/HTTP.

What I've proposed is a combination of #1 and #4. USB devices can be decomposed 
into a number of "functions" and each of these can be declared as accessible 
from a set of origins or none at all. This declaration can either be 
communicated to the user agent by the device itself (using a command set 
included in the specification) or published somewhere (to support existing 
devices).

I chose to make this policy declarative instead of simply telling the device 
what origin is connected to it because:

 a) It supports existing hardware through the use of a public registry.
 b) It lowers the burden on the device firmware to properly understand origins 
and track which ones are using different hardware features. As has been pointed 
out in this thread it is easier to fix a bug in a software library (which will 
be reloaded next time the device is used) than to patch firmware. Also remember 
that these commands need to be implemented on chips costing only a few cents 
with very limited program and data memory. Even the proposed command set, which 
only returns fixed values, is a non-trivial barrier.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Move mailnews/intl back into gecko-dev and use options to choose disable/enable it.

2015-12-07 Thread Yonggang Luo
On Tue, Dec 8, 2015 at 4:55 AM, Joshua Cranmer  
wrote:

> On 12/7/2015 11:38 AM, 罗勇刚(Yonggang Luo) wrote:
>
>> Maintain intl in comm source tree is a big burden, and cause
>> The comm source are tightly coupled with gecko-dev
>> source tree.
>>
>> By providing the necessary functional for comm, we can step forward
>> to removing the building dependencies of comm from gecko-dev source tree.
>>
>> The Encoding part and the Crypt part is the most complicated part, and not
>> be able
>> to move into comm source tree completely, so we may choose an alternative
>> way to do that,
>> use prefs to disable it or enable it.
>>
>
> The code was removed from mozilla-central because mozilla-central
> explicitly does not want to support UTF-7. I rather suspect that Henri
> Sivonen would outright reject (and I would agree with said rejection!) any
> patch to attempt to move the code back to mozilla-central.

It's doesn't need to support in firefox or other gecko-based project, I
means continue to preserve the code, but provide a option to disable/enable
it.

Or the comm source tree need to depends on the internal of gecko, that's a
big problem.

>
>
> --
> Joshua Cranmer
> Thunderbird and DXR developer
> Source code archæologist
>
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>



-- 
 此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: What is the difference between asyncOpen2() and asyncOpen()

2015-12-07 Thread Boris Zbarsky

On 12/7/15 9:15 PM, Patrick McManus wrote:

...you should be able to just use asyncopen2 - it will do security checks
for you that you may have needed to do outside asyncopen (e.g. csp) and
will reliably deal with things like redirects.


Note that asyncOpen2 depends on there being correctly set up nsILoadInfo 
on the channel.


-Boris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform