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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include <climits> | 28 #include <climits> |
29 #include <csignal> | 29 #include <csignal> |
30 #include <string> | 30 #include <string> |
31 #include <map> | 31 #include <map> |
32 | 32 |
33 #include "v8.h" | 33 #include "src/v8.h" |
34 | 34 |
35 #if V8_OS_POSIX | 35 #if V8_OS_POSIX |
36 #include <unistd.h> // NOLINT | 36 #include <unistd.h> // NOLINT |
37 #endif | 37 #endif |
38 | 38 |
39 #include "api.h" | 39 #include "src/api.h" |
40 #include "arguments.h" | 40 #include "src/arguments.h" |
41 #include "cctest.h" | 41 #include "test/cctest/cctest.h" |
42 #include "compilation-cache.h" | 42 #include "src/compilation-cache.h" |
43 #include "cpu-profiler.h" | 43 #include "src/cpu-profiler.h" |
44 #include "execution.h" | 44 #include "src/execution.h" |
45 #include "isolate.h" | 45 #include "src/isolate.h" |
46 #include "objects.h" | 46 #include "src/objects.h" |
47 #include "parser.h" | 47 #include "src/parser.h" |
48 #include "platform.h" | 48 #include "src/platform.h" |
49 #include "snapshot.h" | 49 #include "src/snapshot.h" |
50 #include "unicode-inl.h" | 50 #include "src/unicode-inl.h" |
51 #include "utils.h" | 51 #include "src/utils.h" |
52 #include "vm-state.h" | 52 #include "src/vm-state.h" |
53 #include "../include/v8-util.h" | 53 #include "include/v8-util.h" |
54 | 54 |
55 static const bool kLogThreading = false; | 55 static const bool kLogThreading = false; |
56 | 56 |
57 using ::v8::Boolean; | 57 using ::v8::Boolean; |
58 using ::v8::BooleanObject; | 58 using ::v8::BooleanObject; |
59 using ::v8::Context; | 59 using ::v8::Context; |
60 using ::v8::Extension; | 60 using ::v8::Extension; |
61 using ::v8::Function; | 61 using ::v8::Function; |
62 using ::v8::FunctionTemplate; | 62 using ::v8::FunctionTemplate; |
63 using ::v8::Handle; | 63 using ::v8::Handle; |
(...skipping 22632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22696 Local<Script> script = v8::ScriptCompiler::Compile( | 22696 Local<Script> script = v8::ScriptCompiler::Compile( |
22697 isolate, &script_source); | 22697 isolate, &script_source); |
22698 Local<Value> script_name = script->GetUnboundScript()->GetScriptName(); | 22698 Local<Value> script_name = script->GetUnboundScript()->GetScriptName(); |
22699 CHECK(!script_name.IsEmpty()); | 22699 CHECK(!script_name.IsEmpty()); |
22700 CHECK(script_name->IsString()); | 22700 CHECK(script_name->IsString()); |
22701 String::Utf8Value utf8_name(script_name); | 22701 String::Utf8Value utf8_name(script_name); |
22702 CHECK_EQ(url, *utf8_name); | 22702 CHECK_EQ(url, *utf8_name); |
22703 int line_number = script->GetUnboundScript()->GetLineNumber(0); | 22703 int line_number = script->GetUnboundScript()->GetLineNumber(0); |
22704 CHECK_EQ(13, line_number); | 22704 CHECK_EQ(13, line_number); |
22705 } | 22705 } |
OLD | NEW |