Make sandbox APIs more compatible with normal renderers

- Expose remote shortcuts for the `fs`, `os` and `child_process` modules.
- Expose the `url` and `timers` modules(the browserify versions)
- Add `process.crash` and `process.platform`
This commit is contained in:
Thiago de Arruda 2017-03-21 10:41:23 -03:00
parent 46aed5ff6f
commit e1aebef57c
6 changed files with 26 additions and 14 deletions

View file

@ -9,6 +9,7 @@
#include "atom_natives.h" // NOLINT: This file is generated with js2c
#include "atom/common/api/api_messages.h"
#include "atom/common/api/atom_bindings.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/native_mate_converters/v8_value_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
@ -85,6 +86,7 @@ void InitializeBindings(v8::Local<v8::Object> binding,
auto isolate = context->GetIsolate();
mate::Dictionary b(isolate, binding);
b.SetMethod("get", GetBinding);
b.SetMethod("crash", AtomBindings::Crash);
}
class AtomSandboxedRenderFrameObserver : public content::RenderFrameObserver {