{"action":"closed","issue":{"url":"https://api.github.com/repos/WebAssembly/binaryen/issues/270","repository_url":"https://api.github.com/repos/WebAssembly/binaryen","labels_url":"https://api.github.com/repos/WebAssembly/binaryen/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/binaryen/issues/270/comments","events_url":"https://api.github.com/repos/WebAssembly/binaryen/issues/270/events","html_url":"https://github.com/WebAssembly/binaryen/issues/270","id":142583785,"number":270,"title":"wasmJS is not defined in V8 native module","user":{"login":"antelle","id":633557,"avatar_url":"https://avatars.githubusercontent.com/u/633557?v=3","gravatar_id":"","url":"https://api.github.com/users/antelle","html_url":"https://github.com/antelle","followers_url":"https://api.github.com/users/antelle/followers","following_url":"https://api.github.com/users/antelle/following{/other_user}","gists_url":"https://api.github.com/users/antelle/gists{/gist_id}","starred_url":"https://api.github.com/users/antelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antelle/subscriptions","organizations_url":"https://api.github.com/users/antelle/orgs","repos_url":"https://api.github.com/users/antelle/repos","events_url":"https://api.github.com/users/antelle/events{/privacy}","received_events_url":"https://api.github.com/users/antelle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-22T08:43:29Z","updated_at":"2016-03-22T22:20:00Z","closed_at":"2016-03-22T22:20:00Z","body":"Hello!\r\nI've compiled an app with binaryen and sexpr-wasm-prototype, it successfully loads in browser and starts executing ok in V8.\r\nBut when more memory is allocated, we get to [`mergeMemory(newBuffer)`](https://github.com/WebAssembly/binaryen/blob/6f1cf66e71f3db6af5c2c8087e001fe0c77b0fc4/src/js/wasm.js-post.js#L96) and fail with error that wasmJS is not defined. Looks like it's defined [below](https://github.com/WebAssembly/binaryen/blob/6f1cf66e71f3db6af5c2c8087e001fe0c77b0fc4/src/js/wasm.js-post.js#L203), only when using a polyfill."}}