Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

funny code #8183

Closed
JacksonTian opened this issue Aug 15, 2014 · 6 comments
Closed

funny code #8183

JacksonTian opened this issue Aug 15, 2014 · 6 comments

Comments

@JacksonTian
Copy link

console.log("func 1");
})();

(function() {
    console.log("func 2");

execute result:

func 1
func 2
@JacksonTian
Copy link
Author

After NativeModule.wrap():

(function (exports, require, module, filename, dirname) {
console.log("func 1");
})();

(function() {
    console.log("func 2");
});

@JacksonTian
Copy link
Author

Should we check syntax before run it?

@indutny
Copy link
Member

indutny commented Aug 15, 2014

I think... no, but perhaps @tjfontaine has something to say

@JacksonTian
Copy link
Author

ping @tjfontaine

JacksonTian added a commit to JacksonTian/node that referenced this issue Apr 24, 2015
@brendanashworth
Copy link

This was fixed in node 4 (can't find the commit right now), so closing as it is no longer applicable.

@JacksonTian
Copy link
Author

thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants