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

Side by Side Diff: Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp

Issue 368313005: IDL: Add support for [TreatNullAs=EmptyString] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix debug compilation Created 6 years, 5 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) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const int argc = 1; 79 const int argc = 1;
80 v8::Handle<v8::Value> argv[argc] = { v8String(m_isolate, prefix) }; 80 v8::Handle<v8::Value> argv[argc] = { v8String(m_isolate, prefix) };
81 v8::Handle<v8::Function> function = lookupNamespaceURIFunc.IsEmpty() ? v8::H andle<v8::Function>::Cast(m_resolver) : lookupNamespaceURIFunc; 81 v8::Handle<v8::Function> function = lookupNamespaceURIFunc.IsEmpty() ? v8::H andle<v8::Function>::Cast(m_resolver) : lookupNamespaceURIFunc;
82 82
83 v8::Handle<v8::Value> retval = ScriptController::callFunction(callingExecuti onContext(m_isolate), function, m_resolver, argc, argv, m_isolate); 83 v8::Handle<v8::Value> retval = ScriptController::callFunction(callingExecuti onContext(m_isolate), function, m_resolver, argc, argv, m_isolate);
84 84
85 // Eat exceptions from namespace resolver and return an empty string. This w ill most likely cause NamespaceError. 85 // Eat exceptions from namespace resolver and return an empty string. This w ill most likely cause NamespaceError.
86 if (tryCatch.HasCaught()) 86 if (tryCatch.HasCaught())
87 return nullAtom; 87 return nullAtom;
88 88
89 TOSTRING_DEFAULT(V8StringResource<WithNullCheck>, returnString, retval, null Atom); 89 TOSTRING_DEFAULT(V8StringResource<TreatNullAsNullString>, returnString, retv al, nullAtom);
90 return returnString; 90 return returnString;
91 } 91 }
92 92
93 void V8CustomXPathNSResolver::trace(Visitor* visitor) 93 void V8CustomXPathNSResolver::trace(Visitor* visitor)
94 { 94 {
95 XPathNSResolver::trace(visitor); 95 XPathNSResolver::trace(visitor);
96 } 96 }
97 97
98 } // namespace WebCore 98 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp ('k') | Source/bindings/core/v8/custom/V8HistoryCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698