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

Side by Side Diff: third_party/WebKit/Source/platform/bindings/V8Binding.cpp

Issue 2843603002: Move ScriptWrappable and dependencies to platform/bindings (Closed)
Patch Set: Rebase and try again Created 3 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
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 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "bindings/core/v8/V8Binding.h" 31 #include "platform/bindings/V8Binding.h"
32 32
33 #include "bindings/core/v8/V8BindingMacros.h" 33 #include "platform/bindings/V8BindingMacros.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 v8::Local<v8::Function> GetBoundFunction(v8::Local<v8::Function> function) { 37 v8::Local<v8::Function> GetBoundFunction(v8::Local<v8::Function> function) {
38 v8::Local<v8::Value> bound_function = function->GetBoundFunction(); 38 v8::Local<v8::Value> bound_function = function->GetBoundFunction();
39 return bound_function->IsFunction() 39 return bound_function->IsFunction()
40 ? v8::Local<v8::Function>::Cast(bound_function) 40 ? v8::Local<v8::Function>::Cast(bound_function)
41 : function; 41 : function;
42 } 42 }
43 43
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 v8::Local<v8::Value> FreezeV8Object(v8::Local<v8::Value> value, 79 v8::Local<v8::Value> FreezeV8Object(v8::Local<v8::Value> value,
80 v8::Isolate* isolate) { 80 v8::Isolate* isolate) {
81 value.As<v8::Object>() 81 value.As<v8::Object>()
82 ->SetIntegrityLevel(isolate->GetCurrentContext(), 82 ->SetIntegrityLevel(isolate->GetCurrentContext(),
83 v8::IntegrityLevel::kFrozen) 83 v8::IntegrityLevel::kFrozen)
84 .ToChecked(); 84 .ToChecked();
85 return value; 85 return value;
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/bindings/V8Binding.h ('k') | third_party/WebKit/Source/platform/bindings/V8BindingMacros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698