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

Getting the script name from the FrameMirror fails #262

Closed
irbull opened this issue May 31, 2017 · 0 comments
Closed

Getting the script name from the FrameMirror fails #262

irbull opened this issue May 31, 2017 · 0 comments

Comments

@irbull
Copy link
Member

irbull commented May 31, 2017

Getting the scriptName results in an NPE. This is because we are getting null back for the script name from V8. It's not clear if this is a bug in V8 or something that has changed and we need to adapt.

 public void testGetSourceLocation() {
        handleBreak(new BreakHandler() {

            @Override
            public void onBreak(final DebugEvent event, final ExecutionState state, final EventData eventData, final V8Object data) {
                Frame frame = state.getFrame(0);
                result = frame.getSourceLocation();
                frame.release();
            }
        });

        v8.executeScript(script, "script", 0);

        assertEquals(5, ((SourceLocation) result).getLine());
        assertEquals("script", ((SourceLocation) result).getScriptName());
        assertEquals(0, ((SourceLocation) result).getColumn());
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant