aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/globalscope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/globalscope.rs')
-rw-r--r--components/script/dom/globalscope.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index fca829c9904..4203d0e724c 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -339,13 +339,13 @@ impl GlobalScope {
/// Evaluate JS code on this global scope.
pub fn evaluate_js_on_global_with_result(
&self, code: &str, rval: MutableHandleValue) {
- self.evaluate_script_on_global_with_result(code, "", rval)
+ self.evaluate_script_on_global_with_result(code, "", rval, 1)
}
/// 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) {
+ &self, code: &str, filename: &str, rval: MutableHandleValue, line_number: u32) {
let metadata = time::TimerMetadata {
url: if filename.is_empty() {
self.get_url().as_str().into()
@@ -367,7 +367,7 @@ impl GlobalScope {
let _ac = JSAutoCompartment::new(cx, globalhandle.get());
let _aes = AutoEntryScript::new(self);
- let options = CompileOptionsWrapper::new(cx, filename.as_ptr(), 1);
+ let options = CompileOptionsWrapper::new(cx, filename.as_ptr(), line_number);
unsafe {
if !Evaluate2(cx, options.ptr, code.as_ptr(),
code.len() as libc::size_t,