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

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

Issue 297513008: Decrease call sites of ScriptState::current() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/V8Binding.h ('k') | Source/bindings/v8/V8CustomElementLifecycleCallbacks.h » ('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) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 WTF::ArrayBufferContents::freeMemory(data, size); 137 WTF::ArrayBufferContents::freeMemory(data, size);
138 } 138 }
139 }; 139 };
140 140
141 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator() 141 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator()
142 { 142 {
143 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ()); 143 DEFINE_STATIC_LOCAL(ArrayBufferAllocator, arrayBufferAllocator, ());
144 return &arrayBufferAllocator; 144 return &arrayBufferAllocator;
145 } 145 }
146 146
147 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value> callback, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 147 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value> callback, v8::Handle<v8::Object> creationContext, ScriptState* scriptState)
148 { 148 {
149 RefPtrWillBeRawPtr<NodeFilter> filter = NodeFilter::create(); 149 RefPtrWillBeRawPtr<NodeFilter> filter = NodeFilter::create();
150 150
151 v8::Handle<v8::Object> filterWrapper = toV8(filter, creationContext, isolate ).As<v8::Object>(); 151 v8::Handle<v8::Object> filterWrapper = toV8(filter, creationContext, scriptS tate->isolate()).As<v8::Object>();
152 152
153 RefPtrWillBeRawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::c reate(callback, filterWrapper, isolate); 153 RefPtrWillBeRawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::c reate(callback, filterWrapper, scriptState);
154 filter->setCondition(condition.release()); 154 filter->setCondition(condition.release());
155 155
156 return filter.release(); 156 return filter.release();
157 } 157 }
158 158
159 const int32_t kMaxInt32 = 0x7fffffff; 159 const int32_t kMaxInt32 = 0x7fffffff;
160 const int32_t kMinInt32 = -kMaxInt32 - 1; 160 const int32_t kMinInt32 = -kMaxInt32 - 1;
161 const uint32_t kMaxUInt32 = 0xffffffff; 161 const uint32_t kMaxUInt32 = 0xffffffff;
162 const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, maximum uniqu ely representable integer in ECMAScript. 162 const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, maximum uniqu ely representable integer in ECMAScript.
163 163
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 { 790 {
791 return m_scriptState.get(); 791 return m_scriptState.get();
792 } 792 }
793 793
794 v8::Isolate* V8ExecutionScope::isolate() const 794 v8::Isolate* V8ExecutionScope::isolate() const
795 { 795 {
796 return m_scriptState->isolate(); 796 return m_scriptState->isolate();
797 } 797 }
798 798
799 } // namespace WebCore 799 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/V8CustomElementLifecycleCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698