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

Side by Side Diff: components/dom_distiller/content/renderer/distiller_native_javascript.cc

Issue 1305863012: Fix windows compile error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@js-mojo-combine
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/dom_distiller/content/renderer/distiller_native_javascript. h" 5 #include "components/dom_distiller/content/renderer/distiller_native_javascript. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 v8::Local<v8::Object> GetOrCreateDistillerObject(v8::Isolate* isolate, 64 v8::Local<v8::Object> GetOrCreateDistillerObject(v8::Isolate* isolate,
65 v8::Local<v8::Object> global) { 65 v8::Local<v8::Object> global) {
66 v8::Local<v8::Object> distiller_obj; 66 v8::Local<v8::Object> distiller_obj;
67 v8::Local<v8::Value> distiller_value = 67 v8::Local<v8::Value> distiller_value =
68 global->Get(gin::StringToV8(isolate, "distiller")); 68 global->Get(gin::StringToV8(isolate, "distiller"));
69 if (distiller_value.IsEmpty() || !distiller_value->IsObject()) { 69 if (distiller_value.IsEmpty() || !distiller_value->IsObject()) {
70 distiller_obj = v8::Object::New(isolate); 70 distiller_obj = v8::Object::New(isolate);
71 global->Set(gin::StringToSymbol(isolate, "distiller"), distiller_obj); 71 global->Set(gin::StringToSymbol(isolate, "distiller"), distiller_obj);
72 } else { 72 } else {
73 distiller_obj = v8::Local<v8::Object>::Cast(distiller_value); 73 distiller_obj = distiller_value.As<v8::Object>();
74 } 74 }
75 return distiller_obj; 75 return distiller_obj;
76 } 76 }
77 77
78 } // namespace dom_distiller 78 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698