OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 AllocationTracker::UnresolvedLocation::~UnresolvedLocation() { | 342 AllocationTracker::UnresolvedLocation::~UnresolvedLocation() { |
343 if (!script_.is_null()) { | 343 if (!script_.is_null()) { |
344 GlobalHandles::Destroy(reinterpret_cast<Object**>(script_.location())); | 344 GlobalHandles::Destroy(reinterpret_cast<Object**>(script_.location())); |
345 } | 345 } |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 void AllocationTracker::UnresolvedLocation::Resolve() { | 349 void AllocationTracker::UnresolvedLocation::Resolve() { |
350 if (script_.is_null()) return; | 350 if (script_.is_null()) return; |
351 HandleScope scope(script_->GetIsolate()); | 351 HandleScope scope(script_->GetIsolate()); |
352 info_->line = Script::GetLineNumber(script_, start_position_); | 352 info_->line = GetScriptLineNumber(script_, start_position_); |
353 info_->column = Script::GetColumnNumber(script_, start_position_); | 353 info_->column = GetScriptColumnNumber(script_, start_position_); |
354 } | 354 } |
355 | 355 |
356 | 356 |
357 void AllocationTracker::UnresolvedLocation::HandleWeakScript( | 357 void AllocationTracker::UnresolvedLocation::HandleWeakScript( |
358 const v8::WeakCallbackData<v8::Value, void>& data) { | 358 const v8::WeakCallbackData<v8::Value, void>& data) { |
359 UnresolvedLocation* loc = | 359 UnresolvedLocation* loc = |
360 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); | 360 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); |
361 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); | 361 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); |
362 loc->script_ = Handle<Script>::null(); | 362 loc->script_ = Handle<Script>::null(); |
363 } | 363 } |
364 | 364 |
365 | 365 |
366 } } // namespace v8::internal | 366 } } // namespace v8::internal |
OLD | NEW |