OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 413 matching lines...) Loading... |
424 int offset1_; | 424 int offset1_; |
425 int offset2_; | 425 int offset2_; |
426 }; | 426 }; |
427 | 427 |
428 | 428 |
429 // Wraps raw n-elements line_ends array as a list of n+1 lines. The last line | 429 // Wraps raw n-elements line_ends array as a list of n+1 lines. The last line |
430 // never has terminating new line character. | 430 // never has terminating new line character. |
431 class LineEndsWrapper { | 431 class LineEndsWrapper { |
432 public: | 432 public: |
433 explicit LineEndsWrapper(Handle<String> string) | 433 explicit LineEndsWrapper(Handle<String> string) |
434 : ends_array_(CalculateLineEnds(string, false)), | 434 : ends_array_(String::CalculateLineEnds(string, false)), |
435 string_len_(string->length()) { | 435 string_len_(string->length()) { |
436 } | 436 } |
437 int length() { | 437 int length() { |
438 return ends_array_->length() + 1; | 438 return ends_array_->length() + 1; |
439 } | 439 } |
440 // Returns start for any line including start of the imaginary line after | 440 // Returns start for any line including start of the imaginary line after |
441 // the last line. | 441 // the last line. |
442 int GetLineStart(int index) { | 442 int GetLineStart(int index) { |
443 if (index == 0) { | 443 if (index == 0) { |
444 return 0; | 444 return 0; |
(...skipping 400 matching lines...) Loading... |
845 Factory* factory = isolate->factory(); | 845 Factory* factory = isolate->factory(); |
846 Handle<String> start_pos_key = factory->InternalizeOneByteString( | 846 Handle<String> start_pos_key = factory->InternalizeOneByteString( |
847 STATIC_ASCII_VECTOR("startPosition")); | 847 STATIC_ASCII_VECTOR("startPosition")); |
848 Handle<String> end_pos_key = factory->InternalizeOneByteString( | 848 Handle<String> end_pos_key = factory->InternalizeOneByteString( |
849 STATIC_ASCII_VECTOR("endPosition")); | 849 STATIC_ASCII_VECTOR("endPosition")); |
850 Handle<String> script_obj_key = factory->InternalizeOneByteString( | 850 Handle<String> script_obj_key = factory->InternalizeOneByteString( |
851 STATIC_ASCII_VECTOR("scriptObject")); | 851 STATIC_ASCII_VECTOR("scriptObject")); |
852 Handle<Smi> start_pos( | 852 Handle<Smi> start_pos( |
853 Smi::FromInt(message_location.start_pos()), isolate); | 853 Smi::FromInt(message_location.start_pos()), isolate); |
854 Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()), isolate); | 854 Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()), isolate); |
855 Handle<JSValue> script_obj = GetScriptWrapper(message_location.script()); | 855 Handle<JSObject> script_obj = |
| 856 Script::GetWrapper(message_location.script()); |
856 JSReceiver::SetProperty( | 857 JSReceiver::SetProperty( |
857 rethrow_exception, start_pos_key, start_pos, NONE, SLOPPY).Assert(); | 858 rethrow_exception, start_pos_key, start_pos, NONE, SLOPPY).Assert(); |
858 JSReceiver::SetProperty( | 859 JSReceiver::SetProperty( |
859 rethrow_exception, end_pos_key, end_pos, NONE, SLOPPY).Assert(); | 860 rethrow_exception, end_pos_key, end_pos, NONE, SLOPPY).Assert(); |
860 JSReceiver::SetProperty( | 861 JSReceiver::SetProperty( |
861 rethrow_exception, script_obj_key, script_obj, NONE, SLOPPY).Assert(); | 862 rethrow_exception, script_obj_key, script_obj, NONE, SLOPPY).Assert(); |
862 } | 863 } |
863 } | 864 } |
864 | 865 |
865 // A logical 'finally' section. | 866 // A logical 'finally' section. |
(...skipping 1135 matching lines...) Loading... |
2001 | 2002 |
2002 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 2003 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
2003 return false; | 2004 return false; |
2004 } | 2005 } |
2005 | 2006 |
2006 #endif // ENABLE_DEBUGGER_SUPPORT | 2007 #endif // ENABLE_DEBUGGER_SUPPORT |
2007 | 2008 |
2008 | 2009 |
2009 | 2010 |
2010 } } // namespace v8::internal | 2011 } } // namespace v8::internal |
OLD | NEW |