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 5378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5389 isolate->Enter(); | 5389 isolate->Enter(); |
5390 } | 5390 } |
5391 | 5391 |
5392 | 5392 |
5393 void Isolate::Exit() { | 5393 void Isolate::Exit() { |
5394 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 5394 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
5395 isolate->Exit(); | 5395 isolate->Exit(); |
5396 } | 5396 } |
5397 | 5397 |
5398 | 5398 |
5399 void Isolate::SetData(void* data) { | |
5400 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
5401 isolate->SetData(data); | |
5402 } | |
5403 | |
5404 void* Isolate::GetData() { | |
5405 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
5406 return isolate->GetData(); | |
5407 } | |
5408 | |
5409 | |
5410 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) | 5399 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) |
5411 : str_(NULL), length_(0) { | 5400 : str_(NULL), length_(0) { |
5412 i::Isolate* isolate = i::Isolate::Current(); | 5401 i::Isolate* isolate = i::Isolate::Current(); |
5413 if (IsDeadCheck(isolate, "v8::String::Utf8Value::Utf8Value()")) return; | 5402 if (IsDeadCheck(isolate, "v8::String::Utf8Value::Utf8Value()")) return; |
5414 if (obj.IsEmpty()) return; | 5403 if (obj.IsEmpty()) return; |
5415 ENTER_V8(isolate); | 5404 ENTER_V8(isolate); |
5416 i::HandleScope scope(isolate); | 5405 i::HandleScope scope(isolate); |
5417 TryCatch try_catch; | 5406 TryCatch try_catch; |
5418 Handle<String> str = obj->ToString(); | 5407 Handle<String> str = obj->ToString(); |
5419 if (str.IsEmpty()) return; | 5408 if (str.IsEmpty()) return; |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6420 | 6409 |
6421 | 6410 |
6422 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6411 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6423 HandleScopeImplementer* scope_implementer = | 6412 HandleScopeImplementer* scope_implementer = |
6424 reinterpret_cast<HandleScopeImplementer*>(storage); | 6413 reinterpret_cast<HandleScopeImplementer*>(storage); |
6425 scope_implementer->IterateThis(v); | 6414 scope_implementer->IterateThis(v); |
6426 return storage + ArchiveSpacePerThread(); | 6415 return storage + ArchiveSpacePerThread(); |
6427 } | 6416 } |
6428 | 6417 |
6429 } } // namespace v8::internal | 6418 } } // namespace v8::internal |
OLD | NEW |