summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/bindings/exception_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/bindings/exception_context.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/bindings/exception_context.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/platform/bindings/exception_context.h b/chromium/third_party/blink/renderer/platform/bindings/exception_context.h
index dd74cc1e962..ffb2ee50c37 100644
--- a/chromium/third_party/blink/renderer/platform/bindings/exception_context.h
+++ b/chromium/third_party/blink/renderer/platform/bindings/exception_context.h
@@ -6,7 +6,6 @@
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_EXCEPTION_CONTEXT_H_
#include "base/dcheck_is_on.h"
-#include "base/macros.h"
#include "base/notreached.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
@@ -124,6 +123,13 @@ class PLATFORM_EXPORT ExceptionContext final {
const char* GetPropertyName() const { return property_name_; }
int16_t GetArgumentIndex() const { return argument_index_; }
+ // This is used for a performance hack to reduce the number of construction
+ // and destruction times of ExceptionContext when iterating over properties.
+ // Only the generated bindings code is allowed to use this hack.
+ void ChangePropertyNameAsOptimizationHack(const char* property_name) {
+ property_name_ = property_name;
+ }
+
private:
Context context_ = Context::kEmpty;
int16_t argument_index_ = 0;