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

Side by Side Diff: Source/bindings/v8/ScriptController.cpp

Issue 242223004: Rename macros TONATIVE_BOOL* and TOSTRING_BOOL to *_DEFAULT (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix comment Created 6 years, 8 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 | « Source/bindings/v8/Dictionary.cpp ('k') | Source/bindings/v8/ScriptEventListener.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return ScriptController::callFunction(m_frame->document(), function, receive r, argc, info, m_isolate); 143 return ScriptController::callFunction(m_frame->document(), function, receive r, argc, info, m_isolate);
144 } 144 }
145 145
146 static bool resourceInfo(const v8::Handle<v8::Function> function, String& resour ceName, int& lineNumber) 146 static bool resourceInfo(const v8::Handle<v8::Function> function, String& resour ceName, int& lineNumber)
147 { 147 {
148 v8::ScriptOrigin origin = function->GetScriptOrigin(); 148 v8::ScriptOrigin origin = function->GetScriptOrigin();
149 if (origin.ResourceName().IsEmpty()) { 149 if (origin.ResourceName().IsEmpty()) {
150 resourceName = "undefined"; 150 resourceName = "undefined";
151 lineNumber = 1; 151 lineNumber = 1;
152 } else { 152 } else {
153 TOSTRING_BOOL(V8StringResource<>, stringResourceName, origin.ResourceNam e(), false); 153 TOSTRING_DEFAULT(V8StringResource<>, stringResourceName, origin.Resource Name(), false);
154 resourceName = stringResourceName; 154 resourceName = stringResourceName;
155 lineNumber = function->GetScriptLineNumber() + 1; 155 lineNumber = function->GetScriptLineNumber() + 1;
156 } 156 }
157 return true; 157 return true;
158 } 158 }
159 159
160 v8::Local<v8::Value> ScriptController::callFunction(ExecutionContext* context, v 8::Handle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8:: Handle<v8::Value> info[], v8::Isolate* isolate) 160 v8::Local<v8::Value> ScriptController::callFunction(ExecutionContext* context, v 8::Handle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8:: Handle<v8::Value> info[], v8::Isolate* isolate)
161 { 161 {
162 InspectorInstrumentationCookie cookie; 162 InspectorInstrumentationCookie cookie;
163 if (InspectorInstrumentation::timelineAgentEnabled(context)) { 163 if (InspectorInstrumentation::timelineAgentEnabled(context)) {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 v8Results = evaluateHandleScope.Escape(resultArray); 630 v8Results = evaluateHandleScope.Escape(resultArray);
631 } 631 }
632 632
633 if (results && !v8Results.IsEmpty()) { 633 if (results && !v8Results.IsEmpty()) {
634 for (size_t i = 0; i < v8Results->Length(); ++i) 634 for (size_t i = 0; i < v8Results->Length(); ++i)
635 results->append(ScriptValue(v8Results->Get(i), m_isolate)); 635 results->append(ScriptValue(v8Results->Get(i), m_isolate));
636 } 636 }
637 } 637 }
638 638
639 } // namespace WebCore 639 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/Dictionary.cpp ('k') | Source/bindings/v8/ScriptEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698