Commit Graph

173 Commits

Author SHA1 Message Date
Ari Lazier 6ea80c4ecd beginnings of a parser 2015-11-19 13:05:37 -08:00
Ari Lazier d1a579c922 size_t, no std::size_t 2015-11-19 07:07:33 -08:00
Ari Lazier 55851f6d99 fix for rpc constants and other pr feedback 2015-11-18 17:55:30 -08:00
Ari Lazier a12b6caedb fixes to list.cpp/hpp based on object store pr feedback - use lowercase strings for property names 2015-11-18 14:36:46 -08:00
Scott Kyle 7b115a934b ArrayBufferView objects now fully supported
Previously we were not accounting for the byte offsets and misunderstood how the Uint8Array constructor worked. The tests now confirm everything works as expected with multiple different typed arrays and slices of the data.
2015-11-17 13:32:32 -08:00
Scott Kyle 616f78ea07 Add support for data properties in RPC layer
The data is base64 encoded before being sent via the RPC.
2015-11-17 13:32:31 -08:00
Scott Kyle 3bf84a1b6f Update data properties to return ArrayBuffers
As a convenience, the setters will take typed Arrays (e.g. Uint8Array) since that is a common representation of data in JS (as they are "views" of ArrayBuffer objects).

The tests have been updated to reflect this new behavior.
2015-11-17 13:32:31 -08:00
Ari Lazier 159931e4ec pr fixes 2015-11-16 17:36:28 -08:00
Ari Lazier 53911fefb6 block refresh until the last context has finished execution 2015-11-16 11:16:09 -08:00
Ari Lazier df15c5f722 integrate latest object store changes 2015-11-13 18:20:40 -08:00
Ari Lazier 52da420496 integrate latest object store changes 2015-11-13 18:20:27 -08:00
Scott Kyle 5320df9a5f Merge pull request #116 from realm/sk-realmjs-api
Create API that returns constructor JSObjectRef
2015-11-03 16:39:08 -08:00
Scott Kyle 83869e2193 Prevent memory leaks when adding listeners
Check if the callback has already been added to the set before protecting it. Vice versa for unprotecting it when removing the listener.
2015-11-03 02:43:29 -08:00
Scott Kyle aff11983f3 Create API that returns constructor JSObjectRef
Resolves #98
2015-11-02 22:51:33 -08:00
Ari Lazier 196a0a15a4 allow setting nullable properties to undefined 2015-11-02 10:08:23 -08:00
Ari Lazier 2cff7e291f create docs dir in binding 2015-10-28 14:45:31 -07:00
Ari Lazier 841f45a7b2 change the license before starting the beta 2015-10-27 14:15:21 -07:00
Ari Lazier ec87281cc1 don't convert undefined to null in rpc requests 2015-10-27 12:13:57 -07:00
Ari Lazier 18d65471be fix and tests for setting null properties 2015-10-27 12:13:57 -07:00
Ari Lazier ac1cdfdc8b support null for basic propety types 2015-10-27 12:13:57 -07:00
Ari Lazier e3fb40f299 enable nullable propeties without a macro 2015-10-27 12:13:57 -07:00
Ari Lazier fc631c3e6f wont work until we have propery object store support 2015-10-27 12:13:57 -07:00
Ari Lazier db67fe71ea only ignore invalid property exceptions 2015-10-27 09:39:52 -07:00
Ari Lazier 9092f9ac5f use typed exceptions 2015-10-27 09:39:52 -07:00
Scott Kyle 0511bade62 Non-existent object getters shouldn't throw exceptions 2015-10-27 09:39:52 -07:00
Ari Lazier a1c4cd5702 pr fixes 2015-10-27 07:48:11 -07:00
Ari Lazier 6f41c3cf68 take notification name 2015-10-26 19:18:24 -07:00
Ari Lazier 6f57500972 change notification name to change 2015-10-26 16:19:12 -07:00
Ari Lazier 246ccc7bde add other notification methods 2015-10-26 16:15:46 -07:00
Ari Lazier ab1965c27e no more notification token 2015-10-26 16:03:32 -07:00
Ari Lazier b7d47ac543 apply newest object store changes 2015-10-26 15:27:43 -07:00
Scott Kyle d3cf748dc1 Rename RealmRPC.mm -> RealmRPC.cpp 2015-10-26 01:20:14 -07:00
Scott Kyle 0843d69a4f Expose RealmJS API as C functions
We're still using Objective-C to delete test files, so we can't rename the implementation file quite yet.
2015-10-26 01:14:33 -07:00
Ari Lazier 28e21041bc bugfix and move gcd out of rpc 2015-10-22 18:06:11 -07:00
Ari Lazier 8b5a8a731c fix naming 2015-10-22 17:59:05 -07:00
Ari Lazier c3c9cee0ee make it work 2015-10-22 16:49:32 -07:00
Ari Lazier 92a9113ef6 get it to compile 2015-10-22 15:31:26 -07:00
Ari Lazier 418d6dfc1c partial port of rpc server to cpp 2015-10-22 10:44:10 -07:00
Ari Lazier 1be81205d0 check for undefined was already covered 2015-10-21 23:06:39 -07:00
Ari Lazier ac544205a1 test setting all primitive types to null/undefined throw 2015-10-21 23:06:39 -07:00
Ari Lazier 290a595259 update to latest core 2015-10-21 19:12:36 -07:00
Scott Kyle 9cbc695fd7 Skip throwing an exception inside ResultsSetProperty 2015-10-21 15:59:11 -07:00
Scott Kyle bd2d1559d1 Error when assigning to Result index or length
Added some tests. Turns out our Chrome layer already did this too, so no changes were needed there.

Resolves #70
2015-10-21 15:25:53 -07:00
Scott Kyle 8ba3a24eae Move RealmJSCoreTests.m to tests directory
Test failures were not pointing to the correct JS file path when it was in the src directory. This is where it belongs anyways.
2015-10-21 15:18:47 -07:00
Scott Kyle 34b84759c8 Fix crash when reloading app during Chrome debugging
Added a session ID, that actually tracks the Realm constructor in our RPC server's JS context. This conveniently let us remove the special casing for defaultPath as well as letting us call the Realm constructor with JSObjectCallAsConstructor.

Fixes #68
2015-10-20 15:10:52 -07:00
Scott Kyle b98e89db22 Merge pull request #63 from realm/sk-chrome-apis
Finish implementing APIs for Chrome
2015-10-20 01:23:40 -07:00
Scott Kyle 3439b4c455 Add getter/setter for defaultPath to RPC 2015-10-19 16:59:04 -07:00
Scott Kyle 03751c35b4 Handle passing dates through RPC 2015-10-19 16:46:56 -07:00
Scott Kyle 57778ce878 Improve calling object methods through RPC 2015-10-19 16:15:38 -07:00
Scott Kyle 1b7653206a Generalize getting/setting properties through RPC 2015-10-19 15:46:00 -07:00