diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-02-19 23:56:59 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-02-20 00:38:16 +0100 |
commit | 4f5e262344e76eca3791b2602afa4c542b37e1e4 (patch) | |
tree | 83dfb7c27dad5938879751017de3302f2050024a /ios | |
parent | 14e998723fc0d234c798fa156c0df7b6e4a94478 (diff) |
Revert "android: Various fixes to make the sending from the core to JS..."
Lets leave this optimization for later, this is incomplete, and does not
fix the problem which it was originally supposed to address.
This reverts commit bce922e8fd50b5344b083aedfe04ed072661795b.
Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
Diffstat (limited to 'ios')
-rw-r--r-- | ios/Mobile/Document.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ios/Mobile/Document.mm b/ios/Mobile/Document.mm index 804ba65d2..70d130d64 100644 --- a/ios/Mobile/Document.mm +++ b/ios/Mobile/Document.mm @@ -82,9 +82,9 @@ const char *newline = (const char *)memchr(buffer, '\n', length); if (newline != nullptr) { // The data needs to be an ArrayBuffer - js = @"window.TheFakeWebSocket.onmessage({'base64data':'"; + js = @"window.TheFakeWebSocket.onmessage({'data': Base64ToArrayBuffer('"; js = [js stringByAppendingString: [[NSData dataWithBytes:buffer length:length] base64EncodedStringWithOptions:0]]; - js = [js stringByAppendingString:@"'});"]; + js = [js stringByAppendingString:@"')});"]; NSString *subjs = [js substringToIndex:std::min(100ul, js.length)]; if (subjs.length < js.length) subjs = [subjs stringByAppendingString:@"..."]; @@ -116,7 +116,7 @@ } data.push_back(0); - js = @"window.TheFakeWebSocket.onmessage({'data':'"; + js = @"window.TheFakeWebSocket.onmessage({'data': '"; js = [js stringByAppendingString:[NSString stringWithUTF8String:data.data()]]; js = [js stringByAppendingString:@"'});"]; |