mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
1 parent
e746bbdc2b
commit
75adde07f9
42 files changed
+1839
-1230
No files matched your search
@@ -22,6 +22,8 @@
|
||||
#include "node.h"
|
||||
#include "node_natives.h"
|
||||
#include "v8.h"
|
||||
#include "env.h"
|
||||
#include "env-inl.h"
|
||||
|
||||
#include <string.h>
|
||||
#if !defined(_MSC_VER)
|
||||
@@ -36,17 +38,17 @@ using v8::Local;
|
||||
using v8::Object;
|
||||
using v8::String;
|
||||
|
||||
Handle<String> MainSource() {
|
||||
return OneByteString(node_isolate, node_native, sizeof(node_native) - 1);
|
||||
Handle<String> MainSource(Environment* env) {
|
||||
return OneByteString(env->isolate(), node_native, sizeof(node_native) - 1);
|
||||
}
|
||||
|
||||
void DefineJavaScript(Handle<Object> target) {
|
||||
HandleScope scope(node_isolate);
|
||||
void DefineJavaScript(Environment* env, Handle<Object> target) {
|
||||
HandleScope scope(env->isolate());
|
||||
|
||||
for (int i = 0; natives[i].name; i++) {
|
||||
if (natives[i].source != node_native) {
|
||||
Local<String> name = String::NewFromUtf8(node_isolate, natives[i].name);
|
||||
Handle<String> source = String::NewFromUtf8(node_isolate,
|
||||
Local<String> name = String::NewFromUtf8(env->isolate(), natives[i].name);
|
||||
Handle<String> source = String::NewFromUtf8(env->isolate(),
|
||||
natives[i].source,
|
||||
String::kNormalString,
|
||||
natives[i].source_len);
|
||||
|
||||
Reference in new issue
Block a user