Lines Matching refs:Script
72 // The different types of script compilations matching enum
73 // Script::CompilationType in objects.h.
78 // The different script break point types.
266 // Object representing a script break point. The script is referenced by its
267 // script name or script id and the break point is represented as line and
294 // Creates a clone of script breakpoint that is linked to another script.
403 // Set ignore count on all break points created from this script break point.
410 // Check whether a script matches this script break point. Currently this is
411 // only based on script name.
412 ScriptBreakPoint.prototype.matchesScript = function(script) {
414 return this.script_id_ == script.id;
417 if (!(script.line_offset <= this.line_ &&
418 this.line_ < script.line_offset + script.lineCount())) {
422 return this.script_name_ == script.nameOrSourceURL();
424 return this.script_regexp_object_.test(script.nameOrSourceURL());
432 // Set the script break point in a script.
433 ScriptBreakPoint.prototype.set = function (script) {
440 var source_line = script.sourceLine(this.line());
443 if (!script.sourceColumnStart_) {
444 script.sourceColumnStart_ = new GlobalArray(script.lineCount());
448 if (IS_UNDEFINED(script.sourceColumnStart_[line])) {
449 script.sourceColumnStart_[line] =
452 column = script.sourceColumnStart_[line];
455 // Convert the line and column into an absolute position within the script.
456 var position = Debug.findScriptSourcePosition(script, this.line(), column);
458 // If the position is not found in the script (the script might be shorter
465 var actual_position = %SetScriptBreakPoint(script, position,
471 var actual_location = script.locationFromPosition(actual_position, true);
474 script_id: script.id };
480 // Clear all the break points created from this script break point
496 // Function called from runtime when a new script is compiled to set any script
497 // break points set in this script.
498 function UpdateScriptBreakPoints(script) {
503 break_point.matchesScript(script)) {
504 break_point.set(script);
510 function GetScriptBreakPoints(script) {
513 if (script_break_points[i].matchesScript(script)) {
536 // Returns a Script object. If the parameter is a function the return value
537 // is the script in which the function is defined. If the parameter is a string
538 // the return value is the script for which the script name has that string
539 // value. If it is a regexp and there is a unique script whose name matches
549 var script = scripts[i];
550 if (func_or_script_name.test(script.name)) {
551 last_result = script;
555 // Return the unique script matching the regexp. If there are more
570 // Returns the script source. If the parameter is a function the return value
571 // is the script source for the script in which the function is defined. If the
572 // parameter is a string the return value is the script for which the script
592 var script = %FunctionGetScript(func);
594 return script.locationFromLine(opt_line, opt_column, script_offset);
598 // Returns the character position in a script based on a line number and an
600 Debug.findScriptSourcePosition = function(script, opt_line, opt_column) {
601 var location = script.locationFromLine(opt_line, opt_column);
649 // Find the script for the function.
650 var script = %FunctionGetScript(func);
652 if (script.type == Debug.ScriptType.Native) {
655 // If the script for the function has a name convert this to a script break
657 if (script && script.id) {
658 // Adjust the source position to be script relative.
660 // Find line and column for the position in the script and set a script
662 var location = script.locationFromPosition(source_position, false);
663 return this.setScriptBreakPointById(script.id,
672 var actual_location = script.locationFromPosition(actual_position, true);
675 script_id: script.id };
784 // Sets a breakpoint in a script identified through id or name at the
789 // Create script break point object.
794 // Assign number to the new script break point and add it.
799 // Run through all scripts to see if this script break point matches any
1045 // Add script related information to the event if available.
1046 var script = this.func().script();
1047 if (script) {
1051 o.body.script = MakeScriptObject_(script, false);
1059 // script break point supply the script break point number.
1141 // Add script information to the event if available.
1142 var script = this.func().script();
1143 if (script) {
1144 o.body.script = MakeScriptObject_(script, false);
1154 function MakeCompileEvent(script, type) {
1155 return new CompileEvent(script, type);
1159 function CompileEvent(script, type) {
1160 this.script_ = MakeMirror(script);
1170 CompileEvent.prototype.script = function() {
1190 o.body.script = this.script_;
1196 function MakeScriptObject_(script, include_source) {
1197 var o = { id: script.id(),
1198 name: script.name(),
1199 lineOffset: script.lineOffset(),
1200 columnOffset: script.columnOffset(),
1201 lineCount: script.lineCount(),
1203 if (!IS_UNDEFINED(script.data())) {
1204 o.data = script.data();
1207 o.source = script.source();
1515 // Either function or script break point.
1553 } else if (type == 'script') {
1554 // set script break point.
2123 // Set 'includeSource' option for script lookup.
2201 // Get the script selected.
2202 var script = frame.func().script();
2203 if (!script) {
2208 var slice = script.sourceSlice(from_line, to_line);
2218 response.body.totalLines = script.lineCount();
2270 var script = scripts[i];
2273 if (script.id && script.id === filterNum) {
2278 if (script.name && script.name.indexOf(filterStr) >= 0) {
2342 response.failed('Script not found');