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

Side by Side Diff: content/renderer/chrome_object_extensions_utils.cc

Issue 1113783002: Use Local instead of Handle in src/content/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 #include "content/renderer/chrome_object_extensions_utils.h" 5 #include "content/renderer/chrome_object_extensions_utils.h"
6 6
7 #include "gin/converter.h" 7 #include "gin/converter.h"
8 #include "v8/include/v8.h" 8 #include "v8/include/v8.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 v8::Handle<v8::Object> GetOrCreateChromeObject( 12 v8::Local<v8::Object> GetOrCreateChromeObject(
13 v8::Isolate* isolate, v8::Handle<v8::Object> global) { 13 v8::Isolate* isolate, v8::Local<v8::Object> global) {
14 v8::Handle<v8::Object> chrome; 14 v8::Local<v8::Object> chrome;
15 v8::Handle<v8::Value> chrome_value = 15 v8::Local<v8::Value> chrome_value =
16 global->Get(gin::StringToV8(isolate, "chrome")); 16 global->Get(gin::StringToV8(isolate, "chrome"));
17 if (chrome_value.IsEmpty() || !chrome_value->IsObject()) { 17 if (chrome_value.IsEmpty() || !chrome_value->IsObject()) {
18 chrome = v8::Object::New(isolate); 18 chrome = v8::Object::New(isolate);
19 global->Set(gin::StringToSymbol(isolate, "chrome"), chrome); 19 global->Set(gin::StringToSymbol(isolate, "chrome"), chrome);
20 } else { 20 } else {
21 chrome = v8::Handle<v8::Object>::Cast(chrome_value); 21 chrome = v8::Local<v8::Object>::Cast(chrome_value);
22 } 22 }
23 return chrome; 23 return chrome;
24 } 24 }
25 25
26 } // namespace content 26 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/chrome_object_extensions_utils.h ('k') | content/renderer/dom_automation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698