Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Side by Side Diff: src/api.cc

Issue 18860007: Move InitializeICU() to the V8 API and use it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/shell.cc ('k') | src/d8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 #include "compiler.h" 38 #include "compiler.h"
39 #include "conversions-inl.h" 39 #include "conversions-inl.h"
40 #include "counters.h" 40 #include "counters.h"
41 #include "cpu-profiler.h" 41 #include "cpu-profiler.h"
42 #include "debug.h" 42 #include "debug.h"
43 #include "deoptimizer.h" 43 #include "deoptimizer.h"
44 #include "execution.h" 44 #include "execution.h"
45 #include "global-handles.h" 45 #include "global-handles.h"
46 #include "heap-profiler.h" 46 #include "heap-profiler.h"
47 #include "heap-snapshot-generator-inl.h" 47 #include "heap-snapshot-generator-inl.h"
48 #include "icu_util.h"
48 #include "messages.h" 49 #include "messages.h"
49 #ifdef COMPRESS_STARTUP_DATA_BZ2 50 #ifdef COMPRESS_STARTUP_DATA_BZ2
50 #include "natives.h" 51 #include "natives.h"
51 #endif 52 #endif
52 #include "parser.h" 53 #include "parser.h"
53 #include "platform.h" 54 #include "platform.h"
54 #include "profile-generator-inl.h" 55 #include "profile-generator-inl.h"
55 #include "property-details.h" 56 #include "property-details.h"
56 #include "property.h" 57 #include "property.h"
57 #include "runtime.h" 58 #include "runtime.h"
(...skipping 5361 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 } 5420 }
5420 5421
5421 5422
5422 int v8::V8::ContextDisposedNotification() { 5423 int v8::V8::ContextDisposedNotification() {
5423 i::Isolate* isolate = i::Isolate::Current(); 5424 i::Isolate* isolate = i::Isolate::Current();
5424 if (!isolate->IsInitialized()) return 0; 5425 if (!isolate->IsInitialized()) return 0;
5425 return isolate->heap()->NotifyContextDisposed(); 5426 return isolate->heap()->NotifyContextDisposed();
5426 } 5427 }
5427 5428
5428 5429
5430 bool v8::V8::InitializeICU() {
5431 return i::InitializeICU();
5432 }
5433
5434
5429 const char* v8::V8::GetVersion() { 5435 const char* v8::V8::GetVersion() {
5430 return i::Version::GetVersion(); 5436 return i::Version::GetVersion();
5431 } 5437 }
5432 5438
5433 5439
5434 static i::Handle<i::FunctionTemplateInfo> 5440 static i::Handle<i::FunctionTemplateInfo>
5435 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) { 5441 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) {
5436 if (templ->constructor()->IsUndefined()) { 5442 if (templ->constructor()->IsUndefined()) {
5437 Local<FunctionTemplate> constructor = FunctionTemplate::New(); 5443 Local<FunctionTemplate> constructor = FunctionTemplate::New();
5438 Utils::OpenHandle(*constructor)->set_instance_template(*templ); 5444 Utils::OpenHandle(*constructor)->set_instance_template(*templ);
(...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after
8046 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8052 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8047 Address callback_address = 8053 Address callback_address =
8048 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8054 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8049 VMState<EXTERNAL> state(isolate); 8055 VMState<EXTERNAL> state(isolate);
8050 ExternalCallbackScope call_scope(isolate, callback_address); 8056 ExternalCallbackScope call_scope(isolate, callback_address);
8051 return callback(info); 8057 return callback(info);
8052 } 8058 }
8053 8059
8054 8060
8055 } } // namespace v8::internal 8061 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « samples/shell.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698