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

Added current_line variable to track current line #14661

Closed
wants to merge 6 commits into from
Prev

Updated function call evaluate_script_on_global_with_result. Test htm…

…l file passes
  • Loading branch information
karenher committed Jan 8, 2017
commit 5a76da8050eb9470b1967221ce402718cab4418a
@@ -344,7 +344,7 @@ impl GlobalScope {
/// Evaluate a JS script on this global scope.
#[allow(unsafe_code)]
pub fn evaluate_script_on_global_with_result(
&self, code: &str, filename: &str, rval: MutableHandleValue, line_number: u32) {
&self, code: &str, filename: &str, rval: MutableHandleValue, line_number: u64) {
let metadata = time::TimerMetadata {
url: if filename.is_empty() {
self.get_url().as_str().into()
@@ -365,7 +365,7 @@ impl GlobalScope {
let filename = CString::new(filename).unwrap();

let _ac = JSAutoCompartment::new(cx, globalhandle.get());
let options = CompileOptionsWrapper::new(cx, filename.as_ptr(), line_number);
let options = CompileOptionsWrapper::new(cx, filename.as_ptr(), line_number as u32);
unsafe {
if !Evaluate2(cx, options.ptr, code.as_ptr(),
code.len() as libc::size_t,
@@ -499,7 +499,7 @@ impl HTMLScriptElement {
let window = window_from_node(self);
rooted!(in(window.get_cx()) let mut rval = UndefinedValue());
window.upcast::<GlobalScope>().evaluate_script_on_global_with_result(
&script.text, script.url.as_str(), rval.handle_mut(), 1);
&script.text, script.url.as_str(), rval.handle_mut(), self.line_number);

// Step 6.
document.set_current_script(old_script.r());
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.