Lines Matching defs:script
40 // The different types of script compilations matching enum
41 // Script::CompilationType in objects.h.
46 // The different script break point types.
234 // Object representing a script break point. The script is referenced by its
235 // script name or script id and the break point is represented as line and
262 //Creates a clone of script breakpoint that is linked to another script.
371 // Set ignore count on all break points created from this script break point.
378 // Check whether a script matches this script break point. Currently this is
379 // only based on script name.
380 ScriptBreakPoint.prototype.matchesScript = function(script) {
382 return this.script_id_ == script.id;
385 if (!(script.line_offset <= this.line_ &&
386 this.line_ < script.line_offset + script.lineCount())) {
390 return this.script_name_ == script.nameOrSourceURL();
392 return this.script_regexp_object_.test(script.nameOrSourceURL());
400 // Set the script break point in a script.
401 ScriptBreakPoint.prototype.set = function (script) {
408 var source_line = script.sourceLine(this.line());
411 if (!script.sourceColumnStart_) {
412 script.sourceColumnStart_ = new Array(script.lineCount());
416 if (IS_UNDEFINED(script.sourceColumnStart_[line])) {
417 script.sourceColumnStart_[line] =
420 column = script.sourceColumnStart_[line];
423 // Convert the line and column into an absolute position within the script.
424 var position = Debug.findScriptSourcePosition(script, this.line(), column);
426 // If the position is not found in the script (the script might be shorter
433 var actual_position = %SetScriptBreakPoint(script, position,
439 var actual_location = script.locationFromPosition(actual_position, true);
442 script_id: script.id };
448 // Clear all the break points created from this script break point
464 // Function called from runtime when a new script is compiled to set any script
465 // break points set in this script.
466 function UpdateScriptBreakPoints(script) {
471 break_point.matchesScript(script)) {
472 break_point.set(script);
478 function GetScriptBreakPoints(script) {
481 if (script_break_points[i].matchesScript(script)) {
508 // Returns a Script object. If the parameter is a function the return value
509 // is the script in which the function is defined. If the parameter is a string
510 // the return value is the script for which the script name has that string
511 // value. If it is a regexp and there is a unique script whose name matches
521 var script = scripts[i];
522 if (func_or_script_name.test(script.name)) {
523 last_result = script;
527 // Return the unique script matching the regexp. If there are more
542 // Returns the script source. If the parameter is a function the return value
543 // is the script source for the script in which the function is defined. If the
544 // parameter is a string the return value is the script for which the script
577 var script = %FunctionGetScript(func);
579 return script.locationFromLine(opt_line, opt_column, script_offset);
583 // Returns the character position in a script based on a line number and an
585 Debug.findScriptSourcePosition = function(script, opt_line, opt_column) {
586 var location = script.locationFromLine(opt_line, opt_column);
634 // Find the script for the function.
635 var script = %FunctionGetScript(func);
637 if (script.type == Debug.ScriptType.Native) {
640 // If the script for the function has a name convert this to a script break
642 if (script && script.id) {
643 // Adjust the source position to be script relative.
645 // Find line and column for the position in the script and set a script
647 var location = script.locationFromPosition(source_position, false);
648 return this.setScriptBreakPointById(script.id,
657 var actual_location = script.locationFromPosition(actual_position, true);
660 script_id: script.id };
773 // Sets a breakpoint in a script identified through id or name at the
778 // Create script break point object.
783 // Assign number to the new script break point and add it.
788 // 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.
1144 // Add script information to the event if available.
1145 var script = this.func().script();
1146 if (script) {
1147 o.body.script = MakeScriptObject_(script, false);
1157 function MakeCompileEvent(exec_state, script, before) {
1158 return new CompileEvent(exec_state, script, before);
1162 function CompileEvent(exec_state, script, before) {
1164 this.script_ = MakeMirror(script);
1183 CompileEvent.prototype.script = function() {
1197 o.body.script = this.script_;
1229 o.body.script = { id: this.id() };
1234 function MakeScriptObject_(script, include_source) {
1235 var o = { id: script.id(),
1236 name: script.name(),
1237 lineOffset: script.lineOffset(),
1238 columnOffset: script.columnOffset(),
1239 lineCount: script.lineCount(),
1241 if (!IS_UNDEFINED(script.data())) {
1242 o.data = script.data();
1245 o.source = script.source();
1502 // Either function or script break point.
1540 } else if (type == 'script') {
1541 // set script break point.
2109 // Set 'includeSource' option for script lookup.
2187 // Get the script selected.
2188 var script = frame.func().script();
2189 if (!script) {
2194 var slice = script.sourceSlice(from_line, to_line);
2204 response.body.totalLines = script.lineCount();
2256 var script = scripts[i];
2259 if (script.id && script.id === filterNum) {
2264 if (script.name && script.name.indexOf(filterStr) >= 0) {
2328 response.failed('Script not found');