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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp

Issue 1685543002: Supports "class string" based on @@toStringTag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated test expectations. Created 4 years, 9 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (!result.IsEmpty()) 338 if (!result.IsEmpty())
339 return result; 339 return result;
340 340
341 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 341 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
342 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons tructorMode); 342 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons tructorMode);
343 configureDOMClassTemplate(result, isolate); 343 configureDOMClassTemplate(result, isolate);
344 data->setDOMTemplate(wrapperTypeInfo, result); 344 data->setDOMTemplate(wrapperTypeInfo, result);
345 return result; 345 return result;
346 } 346 }
347 347
348 void V8DOMConfiguration::setClassString(v8::Isolate* isolate, v8::Local<v8::Obje ctTemplate> objectTemplate, const char* classString)
349 {
350 objectTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(isol ate, classString), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnu m));
351 }
352
348 } // namespace blink 353 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698