[wasm] Move the (conditional) installation of the WASM api into bootstrapper.cc.

R=mstarzinger@chromium.org,yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1319003002

Cr-Commit-Position: refs/heads/master@{#30416}
This commit is contained in:
titzer 2015-08-27 07:42:36 -07:00 committed by Commit bot
parent d4e372b41b
commit 76cf87d42f
2 changed files with 9 additions and 9 deletions

View File

@ -18,6 +18,10 @@
#include "src/snapshot/snapshot.h"
#include "third_party/fdlibm/fdlibm.h"
#if defined(V8_WASM)
#include "src/wasm/wasm-js.h"
#endif
namespace v8 {
namespace internal {
@ -2666,6 +2670,11 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) {
Handle<Object> global_proxy(debug_context->global_proxy(), isolate);
JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM);
}
#if defined(V8_WASM)
WasmJs::Install(isolate, global);
#endif
return true;
}

View File

@ -49,10 +49,6 @@
#include "src/v8.h"
#endif // !V8_SHARED
#if defined(V8_WASM)
#include "src/wasm/wasm-js.h"
#endif
#if !defined(_WIN32) && !defined(_WIN64)
#include <unistd.h> // NOLINT
#else
@ -1182,11 +1178,6 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
.ToLocalChecked(),
os_templ);
#if defined(V8_WASM)
// Install WASM API.
WasmJs::Install(isolate, global_template);
#endif
return global_template;
}