cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (Akvelon)" <v-seg...@microsoft.com>
Subject RE: Windows Phone binary bridge
Date Mon, 09 Dec 2013 16:44:38 GMT
This was temporary added for File api (WP8 only)
https://github.com/sgrebnov/cordova-plugin-file/commit/3b39ec350bf5987dcf4676b3e0597d87bbac199e

Michal, right now I see there is base64 string used .

Thx!
Sergey
-----Original Message-----
From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal Mocny
Sent: Monday, December 9, 2013 7:33 PM
To: dev
Subject: Re: Windows Phone binary bridge

Where do you see an implementation using Array.apply(null, new
Uint8Array(...)) ?

We used to have this bug in ios/android binary bridge but that was patched many releases ago
(unless there is a stray one somewhere that still needs fixing).


On Mon, Dec 9, 2013 at 10:15 AM, Sergey Grebnov (Akvelon) < v-segreb@microsoft.com>
wrote:

> Working on this...I just found out that current implementation via 
> Array.apply(null, new Uint8Array(...)) doesn't work for big buffers 
> (bigger than 150Kb) and could raise Maximum call stack size exceeded 
> error. So I'm looking on better/right way to do typed arrays 
> conversion... will keep you updated.
>
> Thx!
> Sergey
> -----Original Message-----
> From: Parashuram Narasimhan (MS OPEN TECH) 
> [mailto:panarasi@microsoft.com]
> Sent: Saturday, December 7, 2013 1:52 AM
> To: dev@cordova.apache.org
> Subject: RE: Windows Phone binary bridge
>
> I think Sergey should be able to squeeze this into his schedule. We 
> were looking at fixing plugin support and this could be a good way to start it.
>
> -----Original Message-----
> From: Jesse [mailto:purplecabbage@gmail.com]
> Sent: Friday, December 6, 2013 1:30 PM
> To: dev@cordova.apache.org
> Subject: Re: Windows Phone binary bridge
>
> FYI, you can buy a no contract Nokia 520 WP8 device for $120, and 
> developing in the emulator is more than sufficient for most tasks.
>
> Sergey, do you got this?
>
>
> @purplecabbage
> risingj.com
>
>
> On Fri, Dec 6, 2013 at 11:21 AM, Ian Clelland <iclelland@chromium.org
> >wrote:
>
> > On Fri, Dec 6, 2013 at 2:15 PM, Sergey Grebnov (Akvelon) < 
> > v-segreb@microsoft.com> wrote:
> >
> > > Agree and  like this idea. I don't think there are many other 
> > > components (if any) which use ArrayBuffer but must be tested well 
> > > anyway since this changes core. Ian do you want to complete this 
> > > yourself or you are ok if
> > I
> > > handle this?
> > >
> >
> > I'm totally okay with you doing it -- I don't have a real windows 
> > phone device to test it on; I'd be committing with my eyes closed 
> > and hoping for the best :)
> >
> > I think you're right that there aren't any other core plugins using 
> > the binary bridge, but that could change, and there are probably 
> > already third-party plugins using it.
> >
> > If we do this right, then other developers won't have to roll their 
> > own solution in each case, and it will be easier to port the 
> > third-party plugins to WP.
> >
> > Let me know if you need any support; I'll help if I can.
> >
> > Ian
> >
> >
> > >
> > > -Sergey
> > > -----Original Message-----
> > > From: iclelland@google.com [mailto:iclelland@google.com] On Behalf 
> > > Of
> > Ian
> > > Clelland
> > > Sent: Friday, December 6, 2013 7:37 PM
> > > To: dev@cordova.apache.org
> > > Subject: Windows Phone binary bridge
> > >
> > > As far as I can tell from reading its exec.js, WP8 does not have a 
> > > binary bridge of any kind. Non-string data get JSON-serialized for
> transfer.
> > >
> > > The recent patch for CB-5532 broke the File plugin by explicitly 
> > > casting ArrayBuffer data to Array type. Sergey's fixed it now, but 
> > > the FileWriter JS code still has special cases for Windows and WP8
> platforms.
> > >
> > > Would it make sense to have this code moved into the WP8 exec bridge?
> > Then
> > > it could apply to any plugins which transfer binary data, and any
> > improved
> > > transport methods would automatically be used by all plugins, 
> > > rather than being a special case in each plugin.
> > >
> > > I don't know much about the Windows phone platform, so I could be 
> > > completely off-base about this, but if it works, I think it'll 
> > > make the implementation cleaner, and generally make Cordova better 
> > > on the
> > platform.
> > >
> > > Ian
> > >
> >
>

Mime
View raw message