Commit Graph

18 Commits

Author SHA1 Message Date
Mike Morris
7df0e459b6 [node] NodeRequest inherits from Nan::AsyncWorker
drop NodeRequest::Create, move MakeCallback to NodeRequest::Execute

rework Respond -> HandleCallback

modern NAN style updates
2016-07-14 13:47:02 -04:00
Konstantin Käfer
27f9a85fea [node] don't fire callback for canceled AsyncRequest 2016-05-26 20:17:36 +02:00
Konstantin Käfer
cd65a43855 [core] move from microsecond precision timestamp to integer second precision 2016-05-13 17:24:22 +02:00
John Firebaugh
675a628aa2 [node] Fix handling of response callback with no arguments; add test 2016-02-19 17:25:57 -08:00
John Firebaugh
1c21d0fd4c [core] Use better types for modified / expires / etag 2016-01-21 11:22:11 -08:00
Konstantin Käfer
4515bb00c0 [node] extract the error message from the Error object
this avoids double "Error: Error: reason" messages
2016-01-14 14:35:02 +01:00
Bruno de Oliveira Abinader
31fd2822f5 [core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
2015-11-27 17:47:02 +02:00
John Firebaugh
c4c3a19d85 [node] Allow GC in spite of reference loops through the request method
The following produces a reference cycle:

var map = new mbgl.Map({
    request: function () { ... }
});

map has a reference to the request function, which has a reference to
its closure, which has a reference to map.

Storing a the map options in an internal field, rather than a Persistent,
allows V8 to collect the reference cycle when none of its members have
other references.
2015-11-20 16:33:46 -08:00
John Firebaugh
7137239cbd [core] Use std::unique_ptr for FileSource request 2015-11-16 12:25:47 -08:00
Konstantin Käfer
04273fbb1c [core] Make DefaultFileSource react to all NetworkStatus changes 2015-11-02 17:25:08 +01:00
Konstantin Käfer
5173bf1bb8 [core] Make response data shared to avoid excessive copying 2015-10-26 15:54:27 +01:00
bsudekum
7112d43609 [node] Handle tiles which 404 better 2015-09-29 18:20:22 -07:00
Mike Morris
1296f91c82 [node] change request semantics
Passes a second, callback argument to the request implementation instead
of needing to call req.respond.
2015-09-10 15:58:29 -04:00
John Firebaugh
0531b38367 Nan 2.0 2015-09-09 14:55:14 -07:00
John Firebaugh
c4c3b5bc71 Remove debug logging 2015-08-31 18:41:57 -07:00
Mike Morris
c2539d6bd4 more logging, don't respond to cancelled requests 2015-08-27 15:23:46 -04:00
Mike Morris
580719c9f9 add request/respond logging 2015-08-27 15:11:42 -04:00
Mike Morris
6e6387e089 move node-mbgl to platform/node/ directory 2015-08-21 16:22:04 -04:00