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

Side by Side Diff: extensions/renderer/file_system_natives.cc

Issue 311053007: Should provide creation context and isolate for WebDOMError::toV8Value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "extensions/renderer/file_system_natives.h" 5 #include "extensions/renderer/file_system_natives.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 #include "extensions/renderer/script_context.h" 10 #include "extensions/renderer/script_context.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 std::string name(*v8::String::Utf8Value(args[0])); 139 std::string name(*v8::String::Utf8Value(args[0]));
140 if (name.empty()) { 140 if (name.empty()) {
141 NOTREACHED(); 141 NOTREACHED();
142 return; 142 return;
143 } 143 }
144 std::string message(*v8::String::Utf8Value(args[1])); 144 std::string message(*v8::String::Utf8Value(args[1]));
145 // message is optional hence empty is fine. 145 // message is optional hence empty is fine.
146 146
147 blink::WebDOMError dom_error = blink::WebDOMError::create( 147 blink::WebDOMError dom_error = blink::WebDOMError::create(
148 blink::WebString::fromUTF8(name), blink::WebString::fromUTF8(message)); 148 blink::WebString::fromUTF8(name), blink::WebString::fromUTF8(message));
149 args.GetReturnValue().Set(dom_error.toV8Value()); 149 args.GetReturnValue().Set(
150 dom_error.toV8Value(args.Holder(), args.GetIsolate()));
150 } 151 }
151 152
152 } // namespace extensions 153 } // namespace extensions
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