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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 rv.Set(true); | 924 rv.Set(true); |
925 CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined()); | 925 CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined()); |
926 rv.Set(v8::Handle<v8::Object>()); | 926 rv.Set(v8::Handle<v8::Object>()); |
927 CHECK((*o)->IsTheHole() || (*o)->IsUndefined()); | 927 CHECK((*o)->IsTheHole() || (*o)->IsUndefined()); |
928 CHECK_EQ(is_runtime, (*o)->IsTheHole()); | 928 CHECK_EQ(is_runtime, (*o)->IsTheHole()); |
929 | 929 |
930 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate()); | 930 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate()); |
931 // If CPU profiler is active check that when API callback is invoked | 931 // If CPU profiler is active check that when API callback is invoked |
932 // VMState is set to EXTERNAL. | 932 // VMState is set to EXTERNAL. |
933 if (isolate->cpu_profiler()->is_profiling()) { | 933 if (isolate->cpu_profiler()->is_profiling()) { |
934 CHECK_EQ(i::EXTERNAL, isolate->current_vm_state()); | 934 CHECK_EQ(v8::EXTERNAL, isolate->current_vm_state()); |
935 CHECK(isolate->external_callback_scope()); | 935 CHECK(isolate->external_callback_scope()); |
936 CHECK_EQ(callback, isolate->external_callback_scope()->callback()); | 936 CHECK_EQ(callback, isolate->external_callback_scope()->callback()); |
937 } | 937 } |
938 } | 938 } |
939 | 939 |
940 | 940 |
941 static void handle_callback_impl(const v8::FunctionCallbackInfo<Value>& info, | 941 static void handle_callback_impl(const v8::FunctionCallbackInfo<Value>& info, |
942 i::Address callback) { | 942 i::Address callback) { |
943 ApiTestFuzzer::Fuzz(); | 943 ApiTestFuzzer::Fuzz(); |
944 CheckReturnValue(info, callback); | 944 CheckReturnValue(info, callback); |
(...skipping 21918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22863 SourceURLHelper("function foo() {}\n" | 22863 SourceURLHelper("function foo() {}\n" |
22864 "//# sourceURL=bar19\".js \n" | 22864 "//# sourceURL=bar19\".js \n" |
22865 "//# sourceMappingURL=bar20\".js \n", | 22865 "//# sourceMappingURL=bar20\".js \n", |
22866 NULL, NULL); | 22866 NULL, NULL); |
22867 | 22867 |
22868 // Not too much whitespace. | 22868 // Not too much whitespace. |
22869 SourceURLHelper("function foo() {}\n" | 22869 SourceURLHelper("function foo() {}\n" |
22870 "//# sourceURL= bar21.js \n" | 22870 "//# sourceURL= bar21.js \n" |
22871 "//# sourceMappingURL= bar22.js \n", "bar21.js", "bar22.js"); | 22871 "//# sourceMappingURL= bar22.js \n", "bar21.js", "bar22.js"); |
22872 } | 22872 } |
OLD | NEW |