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 4612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4623 | 4623 |
4624 void* External::Value() const { | 4624 void* External::Value() const { |
4625 if (IsDeadCheck(i::Isolate::Current(), "v8::External::Value()")) return 0; | 4625 if (IsDeadCheck(i::Isolate::Current(), "v8::External::Value()")) return 0; |
4626 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 4626 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
4627 return ExternalValueImpl(obj); | 4627 return ExternalValueImpl(obj); |
4628 } | 4628 } |
4629 | 4629 |
4630 | 4630 |
4631 Local<String> v8::String::Empty() { | 4631 Local<String> v8::String::Empty() { |
4632 i::Isolate* isolate = i::Isolate::Current(); | 4632 i::Isolate* isolate = i::Isolate::Current(); |
4633 EnsureInitializedForIsolate(isolate, "v8::String::Empty()"); | 4633 if (!EnsureInitializedForIsolate(isolate, "v8::String::Empty()")) { |
Sven Panne
2012/04/25 06:56:22
Just out of curiosity: Why do we need this change?
Michael Starzinger
2012/04/25 08:18:31
Yes, IMHO we need this change in tons of other pla
| |
4634 return v8::Local<String>(); | |
4635 } | |
4634 LOG_API(isolate, "String::Empty()"); | 4636 LOG_API(isolate, "String::Empty()"); |
4635 return Utils::ToLocal(isolate->factory()->empty_symbol()); | 4637 return Utils::ToLocal(isolate->factory()->empty_symbol()); |
4636 } | 4638 } |
4637 | 4639 |
4638 | 4640 |
4639 Local<String> v8::String::New(const char* data, int length) { | 4641 Local<String> v8::String::New(const char* data, int length) { |
4640 i::Isolate* isolate = i::Isolate::Current(); | 4642 i::Isolate* isolate = i::Isolate::Current(); |
4641 EnsureInitializedForIsolate(isolate, "v8::String::New()"); | 4643 EnsureInitializedForIsolate(isolate, "v8::String::New()"); |
4642 LOG_API(isolate, "String::New(char)"); | 4644 LOG_API(isolate, "String::New(char)"); |
4643 if (length == 0) return Empty(); | 4645 if (length == 0) return Empty(); |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6409 | 6411 |
6410 | 6412 |
6411 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6413 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6412 HandleScopeImplementer* scope_implementer = | 6414 HandleScopeImplementer* scope_implementer = |
6413 reinterpret_cast<HandleScopeImplementer*>(storage); | 6415 reinterpret_cast<HandleScopeImplementer*>(storage); |
6414 scope_implementer->IterateThis(v); | 6416 scope_implementer->IterateThis(v); |
6415 return storage + ArchiveSpacePerThread(); | 6417 return storage + ArchiveSpacePerThread(); |
6416 } | 6418 } |
6417 | 6419 |
6418 } } // namespace v8::internal | 6420 } } // namespace v8::internal |
OLD | NEW |