Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 263E510108 for ; Mon, 9 Dec 2013 16:45:50 +0000 (UTC) Received: (qmail 9389 invoked by uid 500); 9 Dec 2013 16:45:49 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 8626 invoked by uid 500); 9 Dec 2013 16:45:43 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 8572 invoked by uid 99); 9 Dec 2013 16:45:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 16:45:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of v-segreb@microsoft.com designates 207.46.163.242 as permitted sender) Received: from [207.46.163.242] (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.163.242) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 16:45:02 +0000 Received: from BL2PR03MB417.namprd03.prod.outlook.com (10.141.92.12) by BL2PR03MB418.namprd03.prod.outlook.com (10.141.92.13) with Microsoft SMTP Server (TLS) id 15.0.837.10; Mon, 9 Dec 2013 16:44:39 +0000 Received: from BL2PR03MB417.namprd03.prod.outlook.com ([10.141.92.12]) by BL2PR03MB417.namprd03.prod.outlook.com ([10.141.92.12]) with mapi id 15.00.0837.004; Mon, 9 Dec 2013 16:44:39 +0000 From: "Sergey Grebnov (Akvelon)" To: "dev@cordova.apache.org" Subject: RE: Windows Phone binary bridge Thread-Topic: Windows Phone binary bridge Thread-Index: AQHO8pkl45YznI7k+0+t2CeIVc1g0JpHhngQgAAFC4CAACPpgIAABhQAgARGBDCAAAcKAIAAEwkA Date: Mon, 9 Dec 2013 16:44:38 +0000 Message-ID: <30d772ddd85f426ab5082ad67f749246@BL2PR03MB417.namprd03.prod.outlook.com> References: <9bc28c5131fb4eb7a8eb4595902e8a06@BL2PR03MB338.namprd03.prod.outlook.com> <311af38e5ccb4e4b9e29237622d531f9@DM2PR03MB366.namprd03.prod.outlook.com> <5a192c7c5bcb4355a713f07bb2706211@BL2PR03MB417.namprd03.prod.outlook.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [109.60.135.109] x-forefront-prvs: 00550ABE1F x-forefront-antispam-report: SFV:NSPM;SFS:(189002)(199002)(24454002)(13464003)(69234005)(51704005)(377454003)(81686001)(90146001)(2656002)(87936001)(56816005)(76482001)(80976001)(74316001)(87266001)(85306002)(74366001)(85852002)(19580405001)(83322001)(19580395003)(81342001)(49866001)(74876001)(81816001)(74662001)(59766001)(81542001)(77982001)(54356001)(51856001)(66066001)(80022001)(4396001)(46102001)(65816001)(79102001)(76576001)(47446002)(15975445006)(54316002)(56776001)(50986001)(74706001)(47976001)(47736001)(53806001)(83072001)(76786001)(74502001)(33646001)(63696002)(76796001)(31966008)(69226001)(24736002);DIR:OUT;SFP:;SCL:1;SRVR:BL2PR03MB418;H:BL2PR03MB417.namprd03.prod.outlook.com;CLIP:109.60.135.109;FPR:;RD:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-Virus-Checked: Checked by ClamAV on apache.org This was temporary added for File api (WP8 only) https://github.com/sgrebnov/cordova-plugin-file/commit/3b39ec350bf5987dcf46= 76b3e0597d87bbac199e 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 Mocn= y 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 f= ixing). On Mon, Dec 9, 2013 at 10:15 AM, Sergey Grebnov (Akvelon) < v-segreb@micros= oft.com> wrote: > Working on this...I just found out that current implementation via=20 > Array.apply(null, new Uint8Array(...)) doesn't work for big buffers=20 > (bigger than 150Kb) and could raise Maximum call stack size exceeded=20 > error. So I'm looking on better/right way to do typed arrays=20 > conversion... will keep you updated. > > Thx! > Sergey > -----Original Message----- > From: Parashuram Narasimhan (MS OPEN TECH)=20 > [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=20 > were looking at fixing plugin support and this could be a good way to sta= rt 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=20 > 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 >wrote: > > > On Fri, Dec 6, 2013 at 2:15 PM, Sergey Grebnov (Akvelon) <=20 > > v-segreb@microsoft.com> wrote: > > > > > Agree and like this idea. I don't think there are many other=20 > > > components (if any) which use ArrayBuffer but must be tested well=20 > > > anyway since this changes core. Ian do you want to complete this=20 > > > yourself or you are ok if > > I > > > handle this? > > > > > > > I'm totally okay with you doing it -- I don't have a real windows=20 > > phone device to test it on; I'd be committing with my eyes closed=20 > > and hoping for the best :) > > > > I think you're right that there aren't any other core plugins using=20 > > the binary bridge, but that could change, and there are probably=20 > > already third-party plugins using it. > > > > If we do this right, then other developers won't have to roll their=20 > > own solution in each case, and it will be easier to port the=20 > > 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=20 > > > 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=20 > > > 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=20 > > > casting ArrayBuffer data to Array type. Sergey's fixed it now, but=20 > > > 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,=20 > > > rather than being a special case in each plugin. > > > > > > I don't know much about the Windows phone platform, so I could be=20 > > > completely off-base about this, but if it works, I think it'll=20 > > > make the implementation cleaner, and generally make Cordova better=20 > > > on the > > platform. > > > > > > Ian > > > > > >