summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-01-08Isolate::execute_mod wrap filename in CString (#1479)Ryan Dahl
When we called js_filename.as_ptr() without using CString it wasn't necessarally null terminated, which was creating spurious failures.
2019-01-06Revert "Split Runner from Compiler" (#1462)Ryan Dahl
This reverts commit 3d03f5b0cb3c513e449f3aaa5d35c493b72f47b4.
2019-01-06Add deno.pid (#1464)Ryan Dahl
2019-01-03Revert "use byte array instead of string for code fetch (#1307)" (#1455)Ryan Dahl
This reverts commit e976b3e0414dc768624b77e431ee7f55b03b76a4. There is nothing technically wrong with this commit, but it's adding complexity to a big refactor (native ES modules #975). Since it's not necessary and simply a philosophical preference, I will revert for now and try to bring it back later.
2019-01-03resolve_module: handle "." and ".." referrers (#1454)Ryan Dahl
2019-01-03Add rust binding and test for deno_execute_mod()Ryan Dahl
2019-01-03Use camel-case for libdeno::deno_recv_cbRyan Dahl
For better greppability and conformance with other symbols in libdeno.rs
2019-01-03Fix test js_error_apply_source_map_2Ryan Dahl
If the project is checked out into a directory not called "deno" this test fails.
2019-01-02Happy new year!Ryan Dahl
2018-12-27Lazily create .mime files only with mismatch/no extension (#1417)Kevin (Kun) "Kassimo" Qian
2018-12-23Remove support for extensionless import (#1396)Ryan Dahl
2018-12-22make stdout unbuffered (#1355)Yoshiya Hinosawa
2018-12-21Avoid fetch segfault on empty Uri (#1394)Kevin (Kun) "Kassimo" Qian
2018-12-19log: bump default minimum log level to "warn"Bert Belder
2018-12-19build: fix RLS-invoked 'cargo check' buildBert Belder
2018-12-14remove repeative permission checks (#1350)F001
2018-12-13Check that IsolateState is thread safe. (#1321)Ryan Dahl
2018-12-13Merge deno_new_snapshotter behavior into deno_new (#1318)Ryan Dahl
2018-12-13Fix deno.open permission check (#1336)Kevin (Kun) "Kassimo" Qian
2018-12-13Read version from Cargo.toml (#1267)Goffert van Gool
2018-12-12Flesh out open() modes (#1282)Bartek IwaƄczuk
2018-12-12Change default to false Base.boolTnarita0000
2018-12-12js_errors: rename source_url to script_name (#1329)ggtmtmgg
2018-12-12use byte array instead of string for code fetch (#1307)F001
2018-12-12Simplify src fetch logic and auto append suffix in cache search (#1322)Kevin (Kun) "Kassimo" Qian
2018-12-12readDir entry mode (#1326)Kevin (Kun) "Kassimo" Qian
2018-12-11Remove custom panic handler.Ryan Dahl
This was introduced because Tokio would swallow panics. This is still the case, but this panic handler causes more problems than it solves. It requires people to know how to use debuggers to inspect stacktraces. TODO: - Fix Tokio to not swallow errors. - Be vigilant in the intrim to not introduce broken tests due to this unfortunate "feature" of tokio.
2018-12-11Use default filename for Isolate::execute.Ryan Dahl
2018-12-11Remove dead code: ASSET_PREFIXRyan Dahl
2018-12-11deno_dir: move tests into submoduleRyan Dahl
2018-12-11Minor rename for CodeFetch parametersRyan Dahl
This bring it inline with terminology used in V8 See ResolveCallback in v8.h
2018-12-11Replace blocking! macro by generic function (#1305)F001
2018-12-10Use stderr for exceptions (#1303)Ryan Dahl
2018-12-09Add TooLarge error code for buffers (#1298)binaryta
In collaboration with @yushimatenjin
2018-12-07v0.2.2Ryan Dahl
- Don't crash when .mime file not exist in cache (#1291) - Process source maps in Rust instead of JS (#1280) - Use alternate TextEncoder/TextDecoder implementation (#1281) - Upgrade flatbuffers to 80d148 - Fix memory leaks (#1265, #1275)
2018-12-07Don't crash when .mime file not exist in cache (#1291)Kevin (Kun) "Kassimo" Qian
2018-12-06Process source maps in Rust instead of JS (#1280)Ryan Dahl
- Improves speed and binary size significantly. - Makes deno_last_exception() output a JSON structure. - Isolate::execute and Isolate::event_loop now return structured, mapped JSError objects on errors. - Removes libdeno functions: libdeno.setGlobalErrorHandler() libdeno.setPromiseRejectHandler() libdeno.setPromiseErrorExaminer() In collaboration with Ryan Dahl.
2018-12-05Isolate::from_raw_ptr and other cleanups.F001
`Isolate::from_void_ptr` is renamed to `from_raw_ptr`, to keep consistency with std libs. It is changed to `unsafe` function, because it can't guarantee that the input is valid. This guarantee should be provided by the caller. Its return type is changed to `&Isolate`, because `&mut Isolate` type requires that no other aliases co-exist in this period of time, this does not seem true. So I changed most of the methods to accept shared reference `&Isolate`. It is easier to reason about the correctness of `unsafe` blocks. As long as these shared references are in the same thread, these `unsafe` codes are probably correct.
2018-12-04Add deno_config struct for isolate creation. (#1277)Ryan Dahl
In preperation for adding other callbacks to libdeno.
2018-12-04Remove static lifetime bound in OpCreator (#1276)F001
The main purpose of this PR is to remove the `'static` lifetime bound in type OpCreator = fn(state: &Arc<IsolateState>, base: &msg::Base, data: &'static mut [u8]) -> Box<Op>; The reason is simple: it is plain wrong, the `data` is actually not `'static`. It is created when the message is sent from C side, and will be recycled when the message is responded. It violates the definition of `'static` lifetime. If someone save this pointer somewhere else, and reuse it later again, uninitialized memory could be accessed. This kind of memory unsafety does not happen yet because the logic is carefully organized in this project. Lifetime constraints are maintained by code convention. It could be more robust if we can express this constraint by Rust's type system. Basic idea: tie buffer's lifetime to an object's lifetime, a.k.a, RAII. The type `deno_buf` is pretty suitable for this job.
2018-12-03Avoid memory leak (#1265)F001
2018-12-03Use include_bytes! instead of incbin.Ryan Dahl
This is the second attempt at this patch. The first version was reverted in 2ffd78daf9956a24098d1f959f21882e350e9d37 The problem, I suspect, was that the snapshot was represented as a source_set, which inserted a node into the dependency tree. include_bytes does properly insert the snapshot into rustc's depfile but the use of source_set confused gn. Now the that the deno executable has the create_deno_snapshot as a direct dependency, changes will be propagated.
2018-11-30v0.2.1Ryan Dahl
- Allow async functions in REPL (#1233) - Handle Location header relative URI (#1240) - Add deno.readAll() (#1234) - Add Process.output (#1235) - Upgrade to TypeScript 3.2.1 - Upgrade crates: tokio 0.1.13, hyper 0.12.16, ring 0.13.5
2018-11-30clippy fixes (#1250)Andy Hayden
2018-11-29Replace mutex by atomics (#1238)F001
2018-11-29Handle Location header relative URI (#1240)Kevin (Kun) "Kassimo" Qian
2018-11-28REPL unblock event loop AND fix REPL setTimeout fire problemsKevin (Kun) "Kassimo" Qian
2018-11-27Don't use snapshot for src/isolate.rs tests.Ryan Dahl
2018-11-23Revert "Use include_bytes! instead of incbin. (#1182)"Ryan Dahl
Reverting because this is causing Appveyor to be red. However I hope we can reintroduce include_bytes! soon in a way that works on windows. Fixes #1208. This reverts commits 96c3641fffe8509af9351cec4580861e76d89cc9 and 92e404706b0b1a26cdaf6f8cf81aac148292557f.
2018-11-16v0.2.0Ryan Dahl
Changes since v0.1.12: - First pass at running subprocesses (#1156) - Improve flag parsing (#1200) - Improve fetch() (#1194 #1188 #1102) - Support shebang (#1197)