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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 CHECK(result.IsEmpty() || v8::Utils::OpenHandle(*result)->IsJSObject()); | 590 CHECK(result.IsEmpty() || v8::Utils::OpenHandle(*result)->IsJSObject()); |
591 #endif | 591 #endif |
592 } | 592 } |
593 } | 593 } |
594 return result; | 594 return result; |
595 } | 595 } |
596 | 596 |
597 | 597 |
598 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { | 598 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { |
599 Isolate* isolate = script->GetIsolate(); | 599 Isolate* isolate = script->GetIsolate(); |
| 600 if (!isolate->IsInitialized()) { |
| 601 return isolate->factory()->undefined_value(); |
| 602 } |
600 Handle<String> name_or_source_url_key = | 603 Handle<String> name_or_source_url_key = |
601 isolate->factory()->InternalizeOneByteString( | 604 isolate->factory()->InternalizeOneByteString( |
602 STATIC_ASCII_VECTOR("nameOrSourceURL")); | 605 STATIC_ASCII_VECTOR("nameOrSourceURL")); |
603 Handle<JSValue> script_wrapper = GetScriptWrapper(script); | 606 Handle<JSValue> script_wrapper = GetScriptWrapper(script); |
604 Handle<Object> property = GetProperty(isolate, | 607 Handle<Object> property = GetProperty(isolate, |
605 script_wrapper, | 608 script_wrapper, |
606 name_or_source_url_key); | 609 name_or_source_url_key); |
607 ASSERT(property->IsJSFunction()); | 610 ASSERT(property->IsJSFunction()); |
608 Handle<JSFunction> method = Handle<JSFunction>::cast(property); | 611 Handle<JSFunction> method = Handle<JSFunction>::cast(property); |
609 bool caught_exception; | 612 bool caught_exception; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 data->next = prev_next_; | 925 data->next = prev_next_; |
923 data->limit = prev_limit_; | 926 data->limit = prev_limit_; |
924 #ifdef DEBUG | 927 #ifdef DEBUG |
925 handles_detached_ = true; | 928 handles_detached_ = true; |
926 #endif | 929 #endif |
927 return deferred; | 930 return deferred; |
928 } | 931 } |
929 | 932 |
930 | 933 |
931 } } // namespace v8::internal | 934 } } // namespace v8::internal |
OLD | NEW |