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

Side by Side Diff: Source/bindings/core/v8/ScriptWrappable.h

Issue 698023005: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « Source/bindings/core/v8/ScriptProfiler.cpp ('k') | Source/bindings/core/v8/ScriptWrappable.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Returns the WrapperTypeInfo of the instance. 69 // Returns the WrapperTypeInfo of the instance.
70 // 70 //
71 // This method must be overridden by DEFINE_WRAPPERTYPEINFO macro. 71 // This method must be overridden by DEFINE_WRAPPERTYPEINFO macro.
72 virtual const WrapperTypeInfo* wrapperTypeInfo() const = 0; 72 virtual const WrapperTypeInfo* wrapperTypeInfo() const = 0;
73 73
74 // Creates and returns a new wrapper object. 74 // Creates and returns a new wrapper object.
75 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*); 75 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*);
76 76
77 // Associates the instance with the existing wrapper. Returns |wrapper|. 77 // Associates the instance with the existing wrapper. Returns |wrapper|.
78 virtual v8::Handle<v8::Object> associateWithWrapper(const WrapperTypeInfo*, v8::Handle<v8::Object> wrapper, v8::Isolate*); 78 virtual v8::Handle<v8::Object> associateWithWrapper(v8::Isolate*, const Wrap perTypeInfo*, v8::Handle<v8::Object> wrapper);
79 79
80 void setWrapper(v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperTypeInfo* wrapperTypeInfo) 80 void setWrapper(v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperTypeInfo* wrapperTypeInfo)
81 { 81 {
82 ASSERT(!containsWrapper()); 82 ASSERT(!containsWrapper());
83 if (!*wrapper) 83 if (!*wrapper)
84 return; 84 return;
85 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(toScriptWrappable(wrapper) == t his); 85 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(toScriptWrappable(wrapper) == t his);
86 m_wrapper.Reset(isolate, wrapper); 86 m_wrapper.Reset(isolate, wrapper);
87 wrapperTypeInfo->configureWrapper(&m_wrapper); 87 wrapperTypeInfo->configureWrapper(&m_wrapper);
88 m_wrapper.SetWeak(this, &setWeakCallback); 88 m_wrapper.SetWeak(this, &setWeakCallback);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 { \ 210 { \
211 ASSERT_NOT_REACHED(); \ 211 ASSERT_NOT_REACHED(); \
212 return 0; \ 212 return 0; \
213 } \ 213 } \
214 private: \ 214 private: \
215 typedef void end_of_define_wrappertypeinfo_not_reached_t 215 typedef void end_of_define_wrappertypeinfo_not_reached_t
216 216
217 } // namespace blink 217 } // namespace blink
218 218
219 #endif // ScriptWrappable_h 219 #endif // ScriptWrappable_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptProfiler.cpp ('k') | Source/bindings/core/v8/ScriptWrappable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698