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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 | 531 |
532 Extension::Extension(const char* name, | 532 Extension::Extension(const char* name, |
533 const char* source, | 533 const char* source, |
534 int dep_count, | 534 int dep_count, |
535 const char** deps, | 535 const char** deps, |
536 int source_length) | 536 int source_length) |
537 : name_(name), | 537 : name_(name), |
538 source_length_(source_length >= 0 ? | 538 source_length_(source_length >= 0 ? |
539 source_length : | 539 source_length : |
540 static_cast<int>(strlen(source))), | 540 (source ? static_cast<int>(strlen(source)) : 0)), |
541 source_(source, source_length_), | 541 source_(source, source_length_), |
542 dep_count_(dep_count), | 542 dep_count_(dep_count), |
543 deps_(deps), | 543 deps_(deps), |
544 auto_enable_(false) { | 544 auto_enable_(false) { } |
545 CHECK(source); | |
546 } | |
547 | 545 |
548 | 546 |
549 v8::Handle<Primitive> Undefined() { | 547 v8::Handle<Primitive> Undefined() { |
550 i::Isolate* isolate = i::Isolate::Current(); | 548 i::Isolate* isolate = i::Isolate::Current(); |
551 if (!EnsureInitializedForIsolate(isolate, "v8::Undefined()")) { | 549 if (!EnsureInitializedForIsolate(isolate, "v8::Undefined()")) { |
552 return v8::Handle<v8::Primitive>(); | 550 return v8::Handle<v8::Primitive>(); |
553 } | 551 } |
554 return v8::Handle<Primitive>(ToApi<Primitive>( | 552 return v8::Handle<Primitive>(ToApi<Primitive>( |
555 isolate->factory()->undefined_value())); | 553 isolate->factory()->undefined_value())); |
556 } | 554 } |
(...skipping 5980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6537 | 6535 |
6538 v->VisitPointers(blocks_.first(), first_block_limit_); | 6536 v->VisitPointers(blocks_.first(), first_block_limit_); |
6539 | 6537 |
6540 for (int i = 1; i < blocks_.length(); i++) { | 6538 for (int i = 1; i < blocks_.length(); i++) { |
6541 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6539 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6542 } | 6540 } |
6543 } | 6541 } |
6544 | 6542 |
6545 | 6543 |
6546 } } // namespace v8::internal | 6544 } } // namespace v8::internal |
OLD | NEW |