OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // TODO(dcarney): Remove this when UnsafePersistent is removed. | |
6 #define V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR | |
7 | |
8 #include "chrome/renderer/extensions/v8_schema_registry.h" | 5 #include "chrome/renderer/extensions/v8_schema_registry.h" |
9 | 6 |
10 #include "base/logging.h" | 7 #include "base/logging.h" |
11 #include "base/values.h" | 8 #include "base/values.h" |
12 #include "chrome/renderer/extensions/chrome_v8_context.h" | 9 #include "chrome/renderer/extensions/chrome_v8_context.h" |
13 #include "chrome/renderer/extensions/object_backed_native_handler.h" | 10 #include "chrome/renderer/extensions/object_backed_native_handler.h" |
14 #include "content/public/renderer/v8_value_converter.h" | 11 #include "content/public/renderer/v8_value_converter.h" |
15 #include "extensions/common/extension_api.h" | 12 #include "extensions/common/extension_api.h" |
16 | 13 |
17 using content::V8ValueConverter; | 14 using content::V8ValueConverter; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 if (context_.IsEmpty()) { | 105 if (context_.IsEmpty()) { |
109 v8::Handle<v8::Context> context = v8::Context::New(isolate); | 106 v8::Handle<v8::Context> context = v8::Context::New(isolate); |
110 context_.reset(context); | 107 context_.reset(context); |
111 schema_cache_.reset(new SchemaCache(isolate)); | 108 schema_cache_.reset(new SchemaCache(isolate)); |
112 return context; | 109 return context; |
113 } | 110 } |
114 return context_.NewHandle(isolate); | 111 return context_.NewHandle(isolate); |
115 } | 112 } |
116 | 113 |
117 } // namespace extensions | 114 } // namespace extensions |
OLD | NEW |