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

Side by Side Diff: webkit/port/bindings/v8/v8_utility.h

Issue 118101: Add ifdef to make upstreaming of v8_utility.h easiler. (Closed)
Patch Set: Created 11 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
« 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef V8_UTILITY_H__ 5 #ifndef V8_UTILITY_H__
6 #define V8_UTILITY_H__ 6 #define V8_UTILITY_H__
7 7
8 #include "V8Utilities.h"
9
10 // To break a cycle dependency during upstreaming this block of code,
11 // ifdefing it out based on this #define.
12 //
13 // TODO(ajwong): After https://bugs.webkit.org/show_bug.cgi?id=25595
14 // lands and is rolled down into chromium, migrate all headaers to use
15 // the code in V8Utilities.h directly, and then, remove this code.
16 #ifndef V8UTILITIES_DEFINED
8 namespace WebCore { 17 namespace WebCore {
9 18
10 class AllowAllocation { 19 class AllowAllocation {
11 public: 20 public:
12 inline AllowAllocation() { 21 inline AllowAllocation() {
13 m_prev = m_current; 22 m_prev = m_current;
14 m_current = true; 23 m_current = true;
15 } 24 }
16 inline ~AllowAllocation() { 25 inline ~AllowAllocation() {
17 m_current = m_prev; 26 m_current = m_prev;
(...skipping 29 matching lines...) Expand all
47 } 56 }
48 57
49 v8::Local<v8::Object> SafeAllocation::NewInstance( 58 v8::Local<v8::Object> SafeAllocation::NewInstance(
50 v8::Handle<v8::Function> fun, int argc, v8::Handle<v8::Value> argv[]) { 59 v8::Handle<v8::Function> fun, int argc, v8::Handle<v8::Value> argv[]) {
51 if (fun.IsEmpty()) return v8::Local<v8::Object>(); 60 if (fun.IsEmpty()) return v8::Local<v8::Object>();
52 AllowAllocation allow; 61 AllowAllocation allow;
53 return fun->NewInstance(argc, argv); 62 return fun->NewInstance(argc, argv);
54 } 63 }
55 64
56 } // namespace WebCore 65 } // namespace WebCore
66 #endif // V8UTILITIES_DEFINED
57 67
58 #endif // V8_UTILITY_H__ 68 #endif // V8_UTILITY_H__
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