Home | History | Annotate | Download | only in src

Lines Matching refs:script

63 // The different types of script compilations matching enum
64 // Script::CompilationType in objects.h.
69 // The different script break point types.
251 // Object representing a script break point. The script is referenced by its
252 // script name or script id and the break point is represented as line and
277 //Creates a clone of script breakpoint that is linked to another script.
385 // Set ignore count on all break points created from this script break point.
392 // Check whether a script matches this script break point. Currently this is
393 // only based on script name.
394 ScriptBreakPoint.prototype.matchesScript = function(script) {
396 return this.script_id_ == script.id;
399 if (!(script.line_offset <= this.line_ &&
400 this.line_ < script.line_offset + script.lineCount())) {
404 return this.script_name_ == script.nameOrSourceURL();
406 return this.script_regexp_object_.test(script.nameOrSourceURL());
414 // Set the script break point in a script.
415 ScriptBreakPoint.prototype.set = function (script) {
422 var source_line = script.sourceLine(this.line());
425 if (!script.sourceColumnStart_) {
426 script.sourceColumnStart_ = new Array(script.lineCount());
430 if (IS_UNDEFINED(script.sourceColumnStart_[line])) {
431 script.sourceColumnStart_[line] =
434 column = script.sourceColumnStart_[line];
437 // Convert the line and column into an absolute position within the script.
438 var position = Debug.findScriptSourcePosition(script, this.line(), column);
440 // If the position is not found in the script (the script might be shorter
447 var actual_position = %SetScriptBreakPoint(script, position, break_point);
451 var actual_location = script.locationFromPosition(actual_position, true);
454 script_id: script.id };
460 // Clear all the break points created from this script break point
476 // Function called from runtime when a new script is compiled to set any script
477 // break points set in this script.
478 function UpdateScriptBreakPoints(script) {
483 break_point.matchesScript(script)) {
484 break_point.set(script);
490 function GetScriptBreakPoints(script) {
493 if (script_break_points[i].matchesScript(script)) {
518 // Returns a Script object. If the parameter is a function the return value
519 // is the script in which the function is defined. If the parameter is a string
520 // the return value is the script for which the script name has that string
521 // value. If it is a regexp and there is a unique script whose name matches
531 var script = scripts[i];
532 if (func_or_script_name.test(script.name)) {
533 last_result = script;
537 // Return the unique script matching the regexp. If there are more
552 // Returns the script source. If the parameter is a function the return value
553 // is the script source for the script in which the function is defined. If the
554 // parameter is a string the return value is the script for which the script
587 var script = %FunctionGetScript(func);
589 return script.locationFromLine(opt_line, opt_column, script_offset);
593 // Returns the character position in a script based on a line number and an
595 Debug.findScriptSourcePosition = function(script, opt_line, opt_column) {
596 var location = script.locationFromLine(opt_line, opt_column);
644 // Find the script for the function.
645 var script = %FunctionGetScript(func);
647 if (script.type == Debug.ScriptType.Native) {
650 // If the script for the function has a name convert this to a script break
652 if (script && script.id) {
653 // Adjust the source position to be script relative.
655 // Find line and column for the position in the script and set a script
657 var location = script.locationFromPosition(source_position, false);
658 return this.setScriptBreakPointById(script.id,
667 var actual_location = script.locationFromPosition(actual_position, true);
670 script_id: script.id };
780 // Sets a breakpoint in a script identified through id or name at the
785 // Create script break point object.
790 // Assign number to the new script break point and add it.
795 // Run through all scripts to see if this script break point matches any
1043 // Add script related information to the event if available.
1044 var script = this.func().script();
1045 if (script) {
1049 o.body.script = MakeScriptObject_(script, false);
1057 // script break point supply the script break point number.
1138 // Add script information to the event if available.
1139 var script = this.func().script();
1140 if (script) {
1141 o.body.script = MakeScriptObject_(script, false);
1151 function MakeCompileEvent(exec_state, script, before) {
1152 return new CompileEvent(exec_state, script, before);
1156 function CompileEvent(exec_state, script, before) {
1158 this.script_ = MakeMirror(script);
1177 CompileEvent.prototype.script = function() {
1191 o.body.script = this.script_;
1248 o.body.script = { id: this.id() };
1253 function MakeScriptObject_(script, include_source) {
1254 var o = { id: script.id(),
1255 name: script.name(),
1256 lineOffset: script.lineOffset(),
1257 columnOffset: script.columnOffset(),
1258 lineCount: script.lineCount(),
1260 if (!IS_UNDEFINED(script.data())) {
1261 o.data = script.data();
1264 o.source = script.source();
1590 // Either function or script break point.
1628 } else if (type == 'script') {
1629 // set script break point.
2126 // Set 'includeSource' option for script lookup.
2204 // Get the script selected.
2205 var script = frame.func().script();
2206 if (!script) {
2211 var slice = script.sourceSlice(from_line, to_line);
2221 response.body.totalLines = script.lineCount();
2273 var script = scripts[i];
2276 if (script.id && script.id === filterNum) {
2281 if (script.name && script.name.indexOf(filterStr) >= 0) {
2360 response.failed('Script not found');