Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic implementation of Java to JS proxy for QuickJs. #144

Merged
merged 3 commits into from Aug 20, 2019

Conversation

@szurbrigg
Copy link
Collaborator

commented Aug 17, 2019

No description provided.

@szurbrigg szurbrigg requested a review from JakeWharton Aug 17, 2019

@szurbrigg

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2019

No argument support, and the internal proxy structures are leaking, but the basics are there.

@@ -0,0 +1,593 @@
/*

This comment has been minimized.

Copy link
@szurbrigg

szurbrigg Aug 17, 2019

Author Collaborator

Pretty much a copy of DuktapeGetTest with some renames.

@@ -66,6 +70,57 @@ public synchronized Object evaluate(@NonNull String script) {
return evaluate(context, script, "?");
}

/**

This comment has been minimized.

Copy link
@szurbrigg

szurbrigg Aug 17, 2019

Author Collaborator

Copied from Duktape.java

import static org.junit.Assert.fail;

public final class QuickJsGetTest {
private QuickJs quickJs;

This comment has been minimized.

Copy link
@JakeWharton

JakeWharton Aug 17, 2019

Collaborator

two-space indent!

if you need it: https://github.com/square/java-code-styles

@JakeWharton JakeWharton requested a review from swankjesse Aug 17, 2019

szurbrigg added 2 commits Aug 18, 2019
const char* sourceCode = (*env)->GetStringUTFChars(env, sourceCode_, 0);
const char* fileName = (*env)->GetStringUTFChars(env, fileName_, 0);

JSValue evalValue = JS_Eval(jsContext, sourceCode, strlen(sourceCode), fileName, 0);

This comment has been minimized.

Copy link
@swankjesse

swankjesse Aug 20, 2019

Member

the asymmetry here will always weird me out

@swankjesse swankjesse merged commit cb12ad2 into master Aug 20, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@swankjesse

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

Supercool.

@oldergod oldergod deleted the szurbrigg/0816-qjs-get-proxy branch Aug 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.