Import Cobalt 20.lts.1.223237
diff --git a/src/base/threading/thread.h b/src/base/threading/thread.h
index 9434c84..b5603c1 100644
--- a/src/base/threading/thread.h
+++ b/src/base/threading/thread.h
@@ -27,6 +27,10 @@
 class MessagePump;
 class RunLoop;
 
+#if defined(STARBOARD)
+const size_t kUnitTestStackSize = 1024 * 1024;
+#endif
+
 namespace sequence_manager {
 class SequenceManager;
 }  // namespace sequence_manager
diff --git a/src/cobalt/CHANGELOG.md b/src/cobalt/CHANGELOG.md
index 1e75f4e..70b84b5 100644
--- a/src/cobalt/CHANGELOG.md
+++ b/src/cobalt/CHANGELOG.md
@@ -131,7 +131,7 @@
    options to be instead run-time options.  This will primarily be enabled
    by the new Starboard extensions framework.  An example of an platform
    specific option added in this way can be found in
-   `cobalt/extension/graphis.h`.
+   `cobalt/extension/graphics.h`.
 
  - **Cobalt code assumes that no errors are generated for unused parameters**
 
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_indexed_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_indexed_getter_interface.cc
index f0bd582..dd9e3ca 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_indexed_getter_interface.cc
@@ -240,9 +240,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -348,9 +347,7 @@
 
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "length",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -365,7 +362,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -431,10 +427,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_getter_interface.cc
index 2e770b3..865b7df 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_getter_interface.cc
@@ -242,9 +242,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -302,9 +301,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -313,7 +310,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -379,10 +375,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_indexed_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_indexed_getter_interface.cc
index 1b596da..e98dcd8 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_anonymous_named_indexed_getter_interface.cc
@@ -339,9 +339,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -447,9 +446,7 @@
 
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "length",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -464,7 +461,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -530,10 +526,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_arbitrary_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_arbitrary_interface.cc
index 429154a..663868c 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_arbitrary_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_arbitrary_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -344,10 +343,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "arbitraryProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -365,7 +361,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -440,10 +435,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_base_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_base_interface.cc
index c4e13c1..374da1c 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_base_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_base_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -292,10 +291,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "baseAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -313,7 +309,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -388,10 +383,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_boolean_type_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_boolean_type_test_interface.cc
index b35bd91..3e5cb25 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_boolean_type_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_boolean_type_test_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -367,7 +366,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_booleanReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -420,10 +418,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "booleanProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -444,7 +439,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -510,10 +504,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_function_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_function_interface.cc
index dd4017b..916a189 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_function_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_function_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -471,7 +470,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_takesFunctionWithNullableParameters(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -536,7 +534,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_takesFunctionWithOneParameter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -601,7 +598,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_takesFunctionWithSeveralParameters(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -666,7 +662,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_takesVoidFunction(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -731,10 +726,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "callbackAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -770,7 +762,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -836,10 +827,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_interface_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_interface_interface.cc
index 57ad85b..20d8f61 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_interface_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_callback_interface_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -371,7 +370,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_someOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -418,10 +416,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "callbackAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -442,7 +437,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -508,10 +502,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_conditional_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_conditional_interface.cc
index dfb4d96..8b87d23 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_conditional_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_conditional_interface.cc
@@ -146,9 +146,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -411,6 +410,7 @@
 #endif  // NO_ENABLE_CONDITIONAL_PROPERTY
 #if defined(NO_ENABLE_CONDITIONAL_PROPERTY)
 
+
 bool fcn_disabledOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -460,6 +460,7 @@
 #endif  // NO_ENABLE_CONDITIONAL_PROPERTY
 #if defined(ENABLE_CONDITIONAL_PROPERTY)
 
+
 bool fcn_enabledOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -508,9 +509,7 @@
 
 #endif  // ENABLE_CONDITIONAL_PROPERTY
 
-
 const JSPropertySpec prototype_properties[] = {
-
 #if defined(ENABLE_CONDITIONAL_PROPERTY)
   {  // Read/Write property
     "enabledAttribute",
@@ -545,7 +544,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -611,10 +609,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constants_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constants_interface.cc
index 43785e0..e7f9026 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constants_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constants_interface.cc
@@ -143,48 +143,8 @@
   return false;
 }
 
-bool get_INTEGER_CONSTANT(
-    JSContext* context, unsigned argc, JS::Value* vp) {
-  COMPILE_ASSERT(ConstantsInterface::kIntegerConstant == 5,
-                 ValueForConstantsInterface_kIntegerConstantDoesNotMatchIDL);
-  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
-  if (!args.thisv().isObject()) {
-    MozjsExceptionState exception(context);
-    exception.SetSimpleException(script::kTypeError, "Invalid this.");
-    return false;
-  }
-  JS::RootedObject object(context, &args.thisv().toObject());
-  MozjsExceptionState exception_state(context);
-  JS::RootedValue result_value(context);
-  ToJSValue(context, 5, &result_value);
-  if (!exception_state.is_exception_set()) {
-    args.rval().set(result_value);
-  }
-  return !exception_state.is_exception_set();
-}
-bool get_DOUBLE_CONSTANT(
-    JSContext* context, unsigned argc, JS::Value* vp) {
-  DCHECK_EQ(2.718, ConstantsInterface::kDoubleConstant) <<
-      "The value for ConstantsInterface::kDoubleConstant does not match "
-      "the value in the interface definition.";
-  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
-  if (!args.thisv().isObject()) {
-    MozjsExceptionState exception(context);
-    exception.SetSimpleException(script::kTypeError, "Invalid this.");
-    return false;
-  }
-  JS::RootedObject object(context, &args.thisv().toObject());
-  MozjsExceptionState exception_state(context);
-  JS::RootedValue result_value(context);
-  ToJSValue(context, 2.718, &result_value);
-  if (!exception_state.is_exception_set()) {
-    args.rval().set(result_value);
-  }
-  return !exception_state.is_exception_set();
-}
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -242,21 +202,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-  {
-      "INTEGER_CONSTANT",
-      JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE,
-      { { &get_INTEGER_CONSTANT, NULL } },
-      JSNATIVE_WRAPPER(NULL)
-  },
-  {
-      "DOUBLE_CONSTANT",
-      JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE,
-      { { &get_DOUBLE_CONSTANT, NULL } },
-      JSNATIVE_WRAPPER(NULL)
-  },
-
   JS_PS_END
 };
 
@@ -265,19 +211,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-  {
-    "INTEGER_CONSTANT",
-    JSPROP_SHARED | JSPROP_ENUMERATE,
-    { { &get_INTEGER_CONSTANT, NULL } },
-    JSNATIVE_WRAPPER(NULL),
-  },
-  {
-    "DOUBLE_CONSTANT",
-    JSPROP_SHARED | JSPROP_ENUMERATE,
-    { { &get_DOUBLE_CONSTANT, NULL } },
-    JSNATIVE_WRAPPER(NULL),
-  },
-
   JS_PS_END
 };
 
@@ -343,10 +276,33 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define constants.
+  {
+    success = JS_DefineProperty(context, rooted_prototype,
+        "INTEGER_CONSTANT", 5,
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+    success = JS_DefineProperty(context, rooted_interface_object,
+        "INTEGER_CONSTANT", 5,
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+  }
+  {
+    success = JS_DefineProperty(context, rooted_prototype,
+        "DOUBLE_CONSTANT", 2.718,
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+    success = JS_DefineProperty(context, rooted_interface_object,
+        "DOUBLE_CONSTANT", 2.718,
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+  }
+
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_interface.cc
index 086f001..2c78212 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -198,9 +197,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -209,7 +206,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -284,10 +280,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_with_arguments_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_with_arguments_interface.cc
index ee0d5a5..71f8d3a 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_with_arguments_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_constructor_with_arguments_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -342,9 +341,7 @@
 
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "longArg",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -371,7 +368,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -446,10 +442,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
@@ -590,11 +587,13 @@
   if (args.length() > 2) {
     JS::RootedValue optional_value0(
         context, args[2]);
-    FromJSValue(context,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &defaultArg);
+    if (!optional_value0.isUndefined()) {
+      FromJSValue(context,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &defaultArg);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_convert_simple_object_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_convert_simple_object_interface.cc
index 969ff32..2c1151d 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_convert_simple_object_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_convert_simple_object_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -262,10 +261,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -277,7 +273,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -352,10 +347,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_getter_setter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_getter_setter_interface.cc
index 56b32c5..e090b2c 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_getter_setter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_getter_setter_interface.cc
@@ -343,9 +343,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -621,7 +620,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_derivedIndexedSetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -698,7 +696,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_operationOnDerivedClass(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -745,10 +742,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "length",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -778,7 +772,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -849,10 +842,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_interface.cc
index e2076d7..e2b04ca 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_derived_interface.cc
@@ -142,9 +142,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -296,10 +295,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "derivedAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -317,7 +313,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -397,10 +392,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dictionary_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dictionary_interface.cc
index 9476c72..39b1361 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dictionary_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dictionary_interface.cc
@@ -149,9 +149,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -373,7 +372,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_dictionaryOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -438,7 +436,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_testOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -503,10 +500,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "dictionarySequence",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -530,7 +524,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -596,10 +589,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_disabled_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_disabled_interface.cc
index 737c6e5..f67b624 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_disabled_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_disabled_interface.cc
@@ -146,9 +146,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -352,10 +351,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "disabledProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -373,7 +369,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -439,10 +434,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dom_string_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dom_string_test_interface.cc
index 8743ada..da518fd 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dom_string_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_dom_string_test_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -699,9 +698,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "property",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -746,7 +743,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -812,10 +808,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_enumeration_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_enumeration_interface.cc
index f750d28..60f5f0f 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_enumeration_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_enumeration_interface.cc
@@ -140,9 +140,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -347,11 +346,13 @@
   if (args.length() > 0) {
     JS::RootedValue optional_value0(
         context, args[0]);
-    FromJSValue(context,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &value);
+    if (!optional_value0.isUndefined()) {
+      FromJSValue(context,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &value);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -362,10 +363,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "enumProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -383,7 +381,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -458,10 +455,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exception_object_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exception_object_interface.cc
index 28d588b..f5f02b5 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exception_object_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exception_object_interface.cc
@@ -144,9 +144,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -300,9 +299,7 @@
 
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "error",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -323,7 +320,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -392,10 +388,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exceptions_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exceptions_interface.cc
index 79f7962..398330a 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exceptions_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_exceptions_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -344,10 +343,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "attributeThrowsException",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -365,7 +361,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -440,10 +435,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_extended_idl_attributes_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_extended_idl_attributes_interface.cc
index beb697c..87b9b72 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_extended_idl_attributes_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_extended_idl_attributes_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -351,7 +350,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_clampArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -416,10 +414,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "default",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -440,7 +435,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -506,10 +500,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_garbage_collection_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_garbage_collection_test_interface.cc
index d922064..6e26a32 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_garbage_collection_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_garbage_collection_test_interface.cc
@@ -142,9 +142,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -402,9 +401,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "previous",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -425,7 +422,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -500,10 +496,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_global_interface_parent.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_global_interface_parent.cc
index 3ae7d9d..869928f 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_global_interface_parent.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_global_interface_parent.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -249,10 +248,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -264,7 +260,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -330,10 +325,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_indexed_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_indexed_getter_interface.cc
index 77c559c..a2341c9 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_indexed_getter_interface.cc
@@ -256,9 +256,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -428,7 +427,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_indexedGetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -499,7 +497,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_indexedSetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -576,10 +573,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "length",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -603,7 +597,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -669,10 +662,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any.cc
index 8503fb6..3e3e903 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -250,7 +249,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setAny(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -315,10 +313,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -333,7 +328,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -408,10 +402,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any_dictionary.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any_dictionary.cc
index 2d4626f..23dd4cf 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any_dictionary.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_any_dictionary.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -250,7 +249,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_hasAny(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -303,7 +301,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_hasAnyDefault(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -356,7 +353,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setAny(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -421,10 +417,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -445,7 +438,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -520,10 +512,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_date.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_date.cc
index 60f9c6b..754f59e 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_date.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_date.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -250,7 +249,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setDate(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -315,10 +313,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -333,7 +328,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -408,10 +402,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_unsupported_properties.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_unsupported_properties.cc
index 5d45693..bea1780 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_unsupported_properties.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_interface_with_unsupported_properties.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -251,9 +250,7 @@
 
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "supportedAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -268,7 +265,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -334,10 +330,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_constructor_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_constructor_interface.cc
index f0d0dcb..2e8864f 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_constructor_interface.cc
@@ -138,9 +138,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -198,9 +197,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -209,7 +206,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -284,10 +280,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_getter_interface.cc
index 324ea48..7957141 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_getter_interface.cc
@@ -258,9 +258,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -382,7 +381,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_namedGetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -453,7 +451,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_namedSetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -530,10 +527,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -551,7 +545,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -617,10 +610,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_indexed_getter_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_indexed_getter_interface.cc
index 5f8a2c5..1e46aa2 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_named_indexed_getter_interface.cc
@@ -339,9 +339,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -617,7 +616,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_indexedSetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -694,7 +692,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_namedGetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -765,7 +762,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_namedSetter(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -842,7 +838,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_operationOnBaseClass(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -889,10 +884,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Readonly attribute
     "length",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -928,7 +920,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -994,10 +985,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nested_put_forwards_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nested_put_forwards_interface.cc
index 158b7da..ce32a61 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nested_put_forwards_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nested_put_forwards_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -329,9 +328,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "nestedForwardingAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -346,7 +343,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -412,10 +408,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_constructor_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_constructor_interface.cc
index f3e738c..66d3768 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_constructor_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -203,9 +202,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -214,7 +211,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -280,10 +276,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_interface_object_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_interface_object_interface.cc
index 272309c..5f2fcb2 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_interface_object_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_no_interface_object_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -203,9 +202,7 @@
 };
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -214,7 +211,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nullable_types_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nullable_types_test_interface.cc
index 2969ca0..c91673c 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nullable_types_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_nullable_types_test_interface.cc
@@ -149,9 +149,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -773,7 +772,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableBooleanOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -826,7 +824,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableDictionaryArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -891,7 +888,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableDictionaryOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -944,7 +940,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableNumericArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1009,7 +1004,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableNumericOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1062,7 +1056,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableObjectArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1127,7 +1120,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableObjectOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1180,7 +1172,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableStringArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1245,7 +1236,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_nullableStringOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1298,10 +1288,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "nullableBooleanProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -1370,7 +1357,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -1436,10 +1422,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_numeric_types_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_numeric_types_test_interface.cc
index 627b79d..238661c 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_numeric_types_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_numeric_types_test_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -2067,7 +2066,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_byteReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2120,7 +2118,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_doubleArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2185,7 +2182,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_doubleReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2238,7 +2234,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_longArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2303,7 +2298,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_longLongArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2368,7 +2362,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_longLongReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2421,7 +2414,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_longReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2474,7 +2466,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_octetArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2539,7 +2530,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_octetReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2592,7 +2582,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_shortArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2657,7 +2646,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_shortReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2710,7 +2698,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unrestrictedDoubleArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2775,7 +2762,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unrestrictedDoubleReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2828,7 +2814,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedLongArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2893,7 +2878,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedLongLongArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -2958,7 +2942,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedLongLongReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -3011,7 +2994,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedLongReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -3064,7 +3046,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedShortArgumentOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -3129,7 +3110,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_unsignedShortReturnOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -3182,10 +3162,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "byteProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -3362,7 +3339,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -3428,10 +3404,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_object_type_bindings_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_object_type_bindings_interface.cc
index 23efb2f..cf4f96a 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_object_type_bindings_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_object_type_bindings_interface.cc
@@ -155,9 +155,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -563,9 +562,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "arbitraryObject",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -598,7 +595,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -664,10 +660,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_operations_test_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_operations_test_interface.cc
index f6340c9..08ac798 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_operations_test_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_operations_test_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -259,7 +258,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_objectFunctionNoArgs(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -312,7 +310,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_optionalArgumentWithDefault(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -360,11 +357,13 @@
   if (args.length() > 0) {
     JS::RootedValue optional_value0(
         context, args[0]);
-    FromJSValue(context,
-                optional_value0,
-                (kConversionFlagRestricted),
-                &exception_state,
-                &arg1);
+    if (!optional_value0.isUndefined()) {
+      FromJSValue(context,
+                  optional_value0,
+                  (kConversionFlagRestricted),
+                  &exception_state,
+                  &arg1);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -375,7 +374,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_optionalArguments(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -441,11 +439,13 @@
   if (args.length() > 1) {
     JS::RootedValue optional_value0(
         context, args[1]);
-    FromJSValue(context,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &arg2);
+    {
+      FromJSValue(context,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &arg2);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -454,11 +454,13 @@
   if (args.length() > 2) {
     JS::RootedValue optional_value1(
         context, args[2]);
-    FromJSValue(context,
-                optional_value1,
-                kNoConversionFlags,
-                &exception_state,
-                &arg3);
+    {
+      FromJSValue(context,
+                  optional_value1,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &arg3);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -492,7 +494,6 @@
   }
 }
 
-
 bool fcn_optionalNullableArgumentsWithDefaults(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -542,11 +543,13 @@
   if (args.length() > 0) {
     JS::RootedValue optional_value0(
         context, args[0]);
-    FromJSValue(context,
-                optional_value0,
-                (kConversionFlagNullable),
-                &exception_state,
-                &arg1);
+    if (!optional_value0.isUndefined()) {
+      FromJSValue(context,
+                  optional_value0,
+                  (kConversionFlagNullable),
+                  &exception_state,
+                  &arg1);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -554,11 +557,13 @@
   if (args.length() > 1) {
     JS::RootedValue optional_value1(
         context, args[1]);
-    FromJSValue(context,
-                optional_value1,
-                (kConversionFlagNullable),
-                &exception_state,
-                &arg2);
+    if (!optional_value1.isUndefined()) {
+      FromJSValue(context,
+                  optional_value1,
+                  (kConversionFlagNullable),
+                  &exception_state,
+                  &arg2);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -568,7 +573,6 @@
   result_value.set(JS::UndefinedHandleValue);
   return !exception_state.is_exception_set();
 }
-
 bool fcn_overloadedFunction1(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -984,7 +988,6 @@
   exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
   return false;
 }
-
 bool fcn_overloadedNullable1(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1146,7 +1149,6 @@
   return false;
 }
 
-
 bool fcn_stringFunctionNoArgs(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1199,7 +1201,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_variadicPrimitiveArguments(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1266,7 +1267,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_variadicStringArgumentsAfterOptionalArgument(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1315,11 +1315,13 @@
   if (args.length() > 0) {
     JS::RootedValue optional_value0(
         context, args[0]);
-    FromJSValue(context,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &optionalArg);
+    {
+      FromJSValue(context,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &optionalArg);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -1371,7 +1373,6 @@
   }
 }
 
-
 bool fcn_voidFunctionLongArg(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1436,7 +1437,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_voidFunctionNoArgs(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1483,7 +1483,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_voidFunctionObjectArg(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1548,7 +1547,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_voidFunctionStringArg(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1612,7 +1610,6 @@
   result_value.set(JS::UndefinedHandleValue);
   return !exception_state.is_exception_set();
 }
-
 bool staticfcn_overloadedFunction1(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1715,10 +1712,7 @@
   return false;
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -1769,7 +1763,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -1838,10 +1831,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_promise_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_promise_interface.cc
index f82e2fd..86b4e6e 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_promise_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_promise_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -249,7 +248,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_returnBooleanPromise(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -302,7 +300,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_returnInterfacePromise(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -355,7 +352,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_returnStringPromise(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -408,7 +404,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_returnVoidPromise(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -461,10 +456,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -488,7 +480,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -554,10 +545,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_put_forwards_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_put_forwards_interface.cc
index dff63a2..43f3409 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_put_forwards_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_put_forwards_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -382,9 +381,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "forwardingAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -399,7 +396,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   {  // Static read/write attribute.
     "staticForwardingAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -471,10 +467,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_sequence_user.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_sequence_user.cc
index 3a35cfd..ac54ebb 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_sequence_user.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_sequence_user.cc
@@ -142,9 +142,8 @@
 
 bool Constructor(JSContext* context, unsigned int argc, JS::Value* vp);
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -254,7 +253,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getInterfaceSequenceSequenceSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -307,7 +305,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getLongSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -360,7 +357,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getStringSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -413,7 +409,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getStringSequenceSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -466,7 +461,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getUnionOfStringAndStringSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -519,7 +513,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_getUnionSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -572,7 +565,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setInterfaceSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -637,7 +629,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setInterfaceSequenceSequenceSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -702,7 +693,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setLongSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -767,7 +757,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setStringSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -832,7 +821,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setStringSequenceSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -897,7 +885,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setUnionOfStringAndStringSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -962,7 +949,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setUnionSequence(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -1027,10 +1013,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -1081,7 +1064,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -1156,10 +1138,11 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_static_properties_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_static_properties_interface.cc
index 5e684bf..475f184 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_static_properties_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_static_properties_interface.cc
@@ -147,9 +147,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -505,10 +504,7 @@
   return false;
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -517,7 +513,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   {  // Static read/write attribute.
     "staticAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -592,10 +587,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_anonymous_operation_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_anonymous_operation_interface.cc
index 173a856..4a01004 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_anonymous_operation_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_anonymous_operation_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -264,7 +263,6 @@
 }
 
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -274,7 +272,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -340,10 +337,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_attribute_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_attribute_interface.cc
index 5aa0204..b381538 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_attribute_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_attribute_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -364,7 +363,6 @@
 }
 
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "theStringifierAttribute",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -380,7 +378,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -446,10 +443,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_operation_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_operation_interface.cc
index a023c7c..23d64c2 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_operation_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_stringifier_operation_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -255,7 +254,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool Stringifier(JSContext* context, unsigned argc, JS::Value *vp) {
   MozjsExceptionState exception_state(context);
   // Compute the 'this' value.
@@ -317,7 +315,6 @@
 }
 
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -330,7 +327,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -396,10 +392,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_target_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_target_interface.cc
index 3aaea2c..1bbecb3 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_target_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_target_interface.cc
@@ -143,9 +143,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -249,7 +248,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_partialInterfaceFunction(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -296,10 +294,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   JS_PS_END
 };
 
@@ -314,7 +309,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -380,10 +374,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_union_types_interface.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_union_types_interface.cc
index dc8e9dc..ba3e4fc 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_union_types_interface.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_union_types_interface.cc
@@ -151,9 +151,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -611,9 +610,7 @@
 }
 
 
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "unionProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -646,7 +643,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -712,10 +708,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_window.cc b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_window.cc
index 2a97c33..5248d37 100644
--- a/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_window.cc
+++ b/src/cobalt/bindings/generated/mozjs45/testing/cobalt/bindings/testing/mozjs_window.cc
@@ -360,9 +360,8 @@
   return false;
 }
 
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -722,7 +721,6 @@
   return !exception_state.is_exception_set();
 }
 
-
 bool fcn_setTimeout(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -787,11 +785,13 @@
   if (args.length() > 1) {
     JS::RootedValue optional_value0(
         context, args[1]);
-    FromJSValue(context,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &timeout);
+    {
+      FromJSValue(context,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &timeout);
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
@@ -830,7 +830,6 @@
   }
 }
 
-
 bool fcn_windowOperation(
     JSContext* context, uint32_t argc, JS::Value *vp) {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@@ -877,10 +876,7 @@
   return !exception_state.is_exception_set();
 }
 
-
-
 const JSPropertySpec prototype_properties[] = {
-
   {  // Read/Write property
     "windowProperty",
     JSPROP_SHARED | JSPROP_ENUMERATE,
@@ -916,7 +912,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-
   JS_PS_END
 };
 
@@ -987,10 +982,11 @@
       NULL, NULL);
   DCHECK(success);
 
-  // Define interface object properties (including constants).
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_indexed_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_indexed_getter_interface.cc
index ea635f3..7a34bae 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_indexed_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -105,14 +106,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     // |index| is out of bounds, so return undefined.
     return;
@@ -122,7 +121,7 @@
     ToJSValue(isolate,
               impl->AnonymousIndexedGetter(index),
               &result_value);
-  }
+}
   info.GetReturnValue().Set(result_value);
 }
 
@@ -137,14 +136,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousIndexedGetterInterface>().get();
   const uint32_t length = impl->length();
   v8::Local<v8::Array> array = v8::Array::New(isolate, length);
   for (uint32_t i = 0; i < length; ++i) {
@@ -171,14 +168,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
@@ -190,7 +185,7 @@
   }
 
   impl->AnonymousIndexedSetter(index, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -209,40 +204,20 @@
 
 void lengthAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cAnonymousIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  AnonymousIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousIndexedGetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<AnonymousIndexedGetterInterface,
+                                                    V8cAnonymousIndexedGetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, AnonymousIndexedGetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->length(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -302,38 +277,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "length");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, lengthAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "length"
+                  ,lengthAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_getter_interface.cc
index 19f942c..4f2c6cc 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -102,14 +103,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
@@ -119,7 +118,7 @@
     ToJSValue(isolate,
               impl->AnonymousNamedGetter(property_name),
               &result_value);
-  }
+}
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -138,14 +137,12 @@
     const v8::PropertyCallbackInfo<v8::Integer>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   bool result = impl->CanQueryNamedProperty(property_name);
   if (!result) {
@@ -174,14 +171,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedGetterInterface>().get();
   v8::Local<v8::Array> array = v8::Array::New(isolate);
   V8cPropertyEnumerator property_enumerator(isolate, &array);
   impl->EnumerateNamedProperties(&property_enumerator);
@@ -198,14 +193,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   TypeTraits<std::string>::ConversionType native_value;
   FromJSValue(isolate, value, kNoConversionFlags,
@@ -215,7 +208,7 @@
   }
 
   impl->AnonymousNamedSetter(property_name, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_indexed_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_indexed_getter_interface.cc
index afaafa4..27aaca4 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_anonymous_named_indexed_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -102,14 +103,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
@@ -119,7 +118,7 @@
     ToJSValue(isolate,
               impl->AnonymousNamedGetter(property_name),
               &result_value);
-  }
+}
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -132,14 +131,12 @@
     const v8::PropertyCallbackInfo<v8::Integer>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   bool result = impl->CanQueryNamedProperty(property_name);
   if (!result) {
@@ -162,14 +159,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   v8::Local<v8::Array> array = v8::Array::New(isolate);
   V8cPropertyEnumerator property_enumerator(isolate, &array);
   impl->EnumerateNamedProperties(&property_enumerator);
@@ -186,14 +181,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   TypeTraits<std::string>::ConversionType native_value;
   FromJSValue(isolate, value, kNoConversionFlags,
@@ -203,7 +196,7 @@
   }
 
   impl->AnonymousNamedSetter(property_name, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -222,14 +215,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     // |index| is out of bounds, so return undefined.
     return;
@@ -239,7 +230,7 @@
     ToJSValue(isolate,
               impl->AnonymousIndexedGetter(index),
               &result_value);
-  }
+}
   info.GetReturnValue().Set(result_value);
 }
 
@@ -254,14 +245,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   const uint32_t length = impl->length();
   v8::Local<v8::Array> array = v8::Array::New(isolate, length);
   for (uint32_t i = 0; i < length; ++i) {
@@ -288,14 +277,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  AnonymousNamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             AnonymousNamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
@@ -307,7 +294,7 @@
   }
 
   impl->AnonymousIndexedSetter(index, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -326,40 +313,20 @@
 
 void lengthAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cAnonymousNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  AnonymousNamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<AnonymousNamedIndexedGetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<AnonymousNamedIndexedGetterInterface,
+                                                    V8cAnonymousNamedIndexedGetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, AnonymousNamedIndexedGetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->length(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -419,38 +386,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "length");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, lengthAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "length"
+                  ,lengthAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_arbitrary_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_arbitrary_interface.cc
index 47f8230..e5ea426 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_arbitrary_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_arbitrary_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -121,67 +122,31 @@
 
 void arbitraryPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cArbitraryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ArbitraryInterface* impl =
-      wrapper_private->wrappable<ArbitraryInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ArbitraryInterface,
+                                                    V8cArbitraryInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ArbitraryInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->arbitrary_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void arbitraryPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cArbitraryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ArbitraryInterface* impl =
-      wrapper_private->wrappable<ArbitraryInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ArbitraryInterface, V8cArbitraryInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ArbitraryInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -190,8 +155,9 @@
   }
 
   impl->set_arbitrary_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -199,28 +165,21 @@
 void arbitraryFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cArbitraryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cArbitraryInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ArbitraryInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ArbitraryInterface>(object);
+  if (!impl) {
     return;
   }
-  ArbitraryInterface* impl =
-      wrapper_private->wrappable<ArbitraryInterface>().get();
 
   impl->ArbitraryFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -281,39 +240,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "arbitraryProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, arbitraryPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, arbitraryPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "arbitraryProperty"
+                  ,arbitraryPropertyAttributeGetter
+                  ,arbitraryPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_base_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_base_interface.cc
index 74adfb7..9afee57 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_base_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_base_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -121,40 +122,20 @@
 
 void baseAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBaseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  BaseInterface* impl =
-      wrapper_private->wrappable<BaseInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<BaseInterface,
+                                                    V8cBaseInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, BaseInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->base_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -163,28 +144,21 @@
 void baseOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBaseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cBaseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  BaseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             BaseInterface>(object);
+  if (!impl) {
     return;
   }
-  BaseInterface* impl =
-      wrapper_private->wrappable<BaseInterface>().get();
 
   impl->BaseOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -245,38 +219,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "baseAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, baseAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "baseAttribute"
+                  ,baseAttributeAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_boolean_type_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_boolean_type_test_interface.cc
index 827670c..33a9f16 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_boolean_type_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_boolean_type_test_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,67 +111,31 @@
 
 void booleanPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBooleanTypeTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  BooleanTypeTestInterface* impl =
-      wrapper_private->wrappable<BooleanTypeTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<BooleanTypeTestInterface,
+                                                    V8cBooleanTypeTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, BooleanTypeTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->boolean_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void booleanPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBooleanTypeTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  BooleanTypeTestInterface* impl =
-      wrapper_private->wrappable<BooleanTypeTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<BooleanTypeTestInterface, V8cBooleanTypeTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, BooleanTypeTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<bool >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -179,8 +144,9 @@
   }
 
   impl->set_boolean_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -188,25 +154,18 @@
 void booleanArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBooleanTypeTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cBooleanTypeTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  BooleanTypeTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             BooleanTypeTestInterface>(object);
+  if (!impl) {
     return;
   }
-  BooleanTypeTestInterface* impl =
-      wrapper_private->wrappable<BooleanTypeTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -225,7 +184,7 @@
   }
 
   impl->BooleanArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -234,31 +193,24 @@
 void booleanReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cBooleanTypeTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cBooleanTypeTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  BooleanTypeTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             BooleanTypeTestInterface>(object);
+  if (!impl) {
     return;
   }
-  BooleanTypeTestInterface* impl =
-      wrapper_private->wrappable<BooleanTypeTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->BooleanReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -321,39 +273,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "booleanProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, booleanPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, booleanPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "booleanProperty"
+                  ,booleanPropertyAttributeGetter
+                  ,booleanPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_function_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_function_interface.cc
index d3c8f0d..2ca0c2e 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_function_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_function_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,67 +115,31 @@
 
 void callbackAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<CallbackFunctionInterface,
+                                                    V8cCallbackFunctionInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackFunctionInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->callback_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void callbackAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<CallbackFunctionInterface, V8cCallbackFunctionInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackFunctionInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<CallbackFunctionInterface::VoidFunction >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -183,74 +148,39 @@
   }
 
   impl->set_callback_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableCallbackAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<CallbackFunctionInterface,
+                                                    V8cCallbackFunctionInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackFunctionInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_callback_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableCallbackAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<CallbackFunctionInterface, V8cCallbackFunctionInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackFunctionInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<CallbackFunctionInterface::VoidFunction >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -259,8 +189,9 @@
   }
 
   impl->set_nullable_callback_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -268,25 +199,18 @@
 void takesFunctionThatReturnsStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackFunctionInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackFunctionInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackFunctionInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -305,7 +229,7 @@
   }
 
   impl->TakesFunctionThatReturnsString(cb);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -314,25 +238,18 @@
 void takesFunctionWithNullableParametersMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackFunctionInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackFunctionInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackFunctionInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -351,7 +268,7 @@
   }
 
   impl->TakesFunctionWithNullableParameters(cb);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -360,25 +277,18 @@
 void takesFunctionWithOneParameterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackFunctionInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackFunctionInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackFunctionInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -397,7 +307,7 @@
   }
 
   impl->TakesFunctionWithOneParameter(cb);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -406,25 +316,18 @@
 void takesFunctionWithSeveralParametersMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackFunctionInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackFunctionInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackFunctionInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -443,7 +346,7 @@
   }
 
   impl->TakesFunctionWithSeveralParameters(cb);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -452,25 +355,18 @@
 void takesVoidFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackFunctionInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackFunctionInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackFunctionInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackFunctionInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackFunctionInterface* impl =
-      wrapper_private->wrappable<CallbackFunctionInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -489,7 +385,7 @@
   }
 
   impl->TakesVoidFunction(cb);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -549,75 +445,45 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "callbackAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, callbackAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, callbackAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "callbackAttribute"
+                  ,callbackAttributeAttributeGetter
+                  ,callbackAttributeAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableCallbackAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableCallbackAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableCallbackAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableCallbackAttribute"
+                  ,nullableCallbackAttributeAttributeGetter
+                  ,nullableCallbackAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_interface_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_interface_interface.cc
index 1cd9aeb..068f1cb 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_interface_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_callback_interface_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,67 +115,31 @@
 
 void callbackAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackInterfaceInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackInterfaceInterface* impl =
-      wrapper_private->wrappable<CallbackInterfaceInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<CallbackInterfaceInterface,
+                                                    V8cCallbackInterfaceInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackInterfaceInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->callback_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void callbackAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackInterfaceInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  CallbackInterfaceInterface* impl =
-      wrapper_private->wrappable<CallbackInterfaceInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<CallbackInterfaceInterface, V8cCallbackInterfaceInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, CallbackInterfaceInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::CallbackInterfaceTraits<SingleOperationInterface > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -183,8 +148,9 @@
   }
 
   impl->set_callback_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -192,25 +158,18 @@
 void registerCallbackMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackInterfaceInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackInterfaceInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackInterfaceInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackInterfaceInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackInterfaceInterface* impl =
-      wrapper_private->wrappable<CallbackInterfaceInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -229,7 +188,7 @@
   }
 
   impl->RegisterCallback(callbackInterface);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -238,28 +197,21 @@
 void someOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cCallbackInterfaceInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cCallbackInterfaceInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  CallbackInterfaceInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             CallbackInterfaceInterface>(object);
+  if (!impl) {
     return;
   }
-  CallbackInterfaceInterface* impl =
-      wrapper_private->wrappable<CallbackInterfaceInterface>().get();
 
   impl->SomeOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -319,39 +271,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "callbackAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, callbackAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, callbackAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "callbackAttribute"
+                  ,callbackAttributeAttributeGetter
+                  ,callbackAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_conditional_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_conditional_interface.cc
index 2ebfed4..3a9752d 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_conditional_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_conditional_interface.cc
@@ -53,6 +53,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,67 +115,31 @@
 
 void enabledAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ConditionalInterface,
+                                                    V8cConditionalInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConditionalInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->enabled_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void enabledAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ConditionalInterface, V8cConditionalInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConditionalInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -183,8 +148,9 @@
   }
 
   impl->set_enabled_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 #endif  // ENABLE_CONDITIONAL_PROPERTY
@@ -192,67 +158,31 @@
 
 void disabledAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ConditionalInterface,
+                                                    V8cConditionalInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConditionalInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->disabled_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void disabledAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ConditionalInterface, V8cConditionalInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConditionalInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -261,8 +191,9 @@
   }
 
   impl->set_disabled_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 #endif  // NO_ENABLE_CONDITIONAL_PROPERTY
@@ -272,28 +203,21 @@
 void disabledOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cConditionalInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ConditionalInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ConditionalInterface>(object);
+  if (!impl) {
     return;
   }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
 
   impl->DisabledOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -304,28 +228,21 @@
 void enabledOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConditionalInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cConditionalInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ConditionalInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ConditionalInterface>(object);
+  if (!impl) {
     return;
   }
-  ConditionalInterface* impl =
-      wrapper_private->wrappable<ConditionalInterface>().get();
 
   impl->EnabledOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -387,77 +304,47 @@
   // follows:
 #if defined(ENABLE_CONDITIONAL_PROPERTY)
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "enabledAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, enabledAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, enabledAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "enabledAttribute"
+                  ,enabledAttributeAttributeGetter
+                  ,enabledAttributeAttributeSetter
+                  );
 
   }
 #endif  // ENABLE_CONDITIONAL_PROPERTY
 #if defined(NO_ENABLE_CONDITIONAL_PROPERTY)
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "disabledAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, disabledAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, disabledAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "disabledAttribute"
+                  ,disabledAttributeAttributeGetter
+                  ,disabledAttributeAttributeSetter
+                  );
 
   }
 #endif  // NO_ENABLE_CONDITIONAL_PROPERTY
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constants_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constants_interface.cc
index 2287821..a8a9b3f 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constants_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constants_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_interface.cc
index 463ab84..4ec70f5 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_with_arguments_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_with_arguments_interface.cc
index 330ec14..0505e2f 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_with_arguments_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_constructor_with_arguments_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -136,11 +137,13 @@
   size_t num_set_arguments = 3;
   if (info.Length() > 2) {
     v8::Local<v8::Value> optional_value0 = info[2];
-    FromJSValue(isolate,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &defaultArg);
+    if (!optional_value0->IsUndefined()) {
+      FromJSValue(isolate,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &defaultArg);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -162,120 +165,60 @@
 
 void longArgAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConstructorWithArgumentsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConstructorWithArgumentsInterface* impl =
-      wrapper_private->wrappable<ConstructorWithArgumentsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ConstructorWithArgumentsInterface,
+                                                    V8cConstructorWithArgumentsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConstructorWithArgumentsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->long_arg(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void booleanArgAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConstructorWithArgumentsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConstructorWithArgumentsInterface* impl =
-      wrapper_private->wrappable<ConstructorWithArgumentsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ConstructorWithArgumentsInterface,
+                                                    V8cConstructorWithArgumentsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConstructorWithArgumentsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->boolean_arg(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void stringArgAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConstructorWithArgumentsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ConstructorWithArgumentsInterface* impl =
-      wrapper_private->wrappable<ConstructorWithArgumentsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ConstructorWithArgumentsInterface,
+                                                    V8cConstructorWithArgumentsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ConstructorWithArgumentsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->string_arg(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -336,108 +279,63 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "longArg");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, longArgAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "longArg"
+                  ,longArgAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "booleanArg");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, booleanArgAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "booleanArg"
+                  ,booleanArgAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "stringArg");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, stringArgAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "stringArg"
+                  ,stringArgAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_convert_simple_object_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_convert_simple_object_interface.cc
index f62c57c..58007b9 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_convert_simple_object_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_convert_simple_object_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -123,25 +124,18 @@
 void convertSimpleObjectToMapTestMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cConvertSimpleObjectInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cConvertSimpleObjectInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ConvertSimpleObjectInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ConvertSimpleObjectInterface>(object);
+  if (!impl) {
     return;
   }
-  ConvertSimpleObjectInterface* impl =
-      wrapper_private->wrappable<ConvertSimpleObjectInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -160,7 +154,7 @@
   }
 
   impl->ConvertSimpleObjectToMapTest(value, &exception_state);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_getter_setter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_getter_setter_interface.cc
index 865b1a7..53fe18e 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_getter_setter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_getter_setter_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -106,14 +107,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
@@ -123,7 +122,7 @@
     ToJSValue(isolate,
               impl->AnonymousNamedGetter(property_name),
               &result_value);
-  }
+}
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -136,14 +135,12 @@
     const v8::PropertyCallbackInfo<v8::Integer>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   bool result = impl->CanQueryNamedProperty(property_name);
   if (!result) {
@@ -166,14 +163,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   v8::Local<v8::Array> array = v8::Array::New(isolate);
   V8cPropertyEnumerator property_enumerator(isolate, &array);
   impl->EnumerateNamedProperties(&property_enumerator);
@@ -190,14 +185,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   TypeTraits<std::string>::ConversionType native_value;
   FromJSValue(isolate, value, kNoConversionFlags,
@@ -207,7 +200,7 @@
   }
 
   impl->AnonymousNamedSetter(property_name, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -226,14 +219,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   if (index >= impl->length()) {
     // |index| is out of bounds, so return undefined.
     return;
@@ -243,7 +234,7 @@
     ToJSValue(isolate,
               impl->DerivedIndexedGetter(index),
               &result_value);
-  }
+}
   info.GetReturnValue().Set(result_value);
 }
 
@@ -258,14 +249,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   const uint32_t length = impl->length();
   v8::Local<v8::Array> array = v8::Array::New(isolate, length);
   for (uint32_t i = 0; i < length; ++i) {
@@ -292,14 +281,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
@@ -311,7 +298,7 @@
   }
 
   impl->DerivedIndexedSetter(index, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -330,107 +317,51 @@
 
 void lengthAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DerivedGetterSetterInterface,
+                                                    V8cDerivedGetterSetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DerivedGetterSetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->length(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void propertyOnDerivedClassAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DerivedGetterSetterInterface,
+                                                    V8cDerivedGetterSetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DerivedGetterSetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->property_on_derived_class(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void propertyOnDerivedClassAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DerivedGetterSetterInterface, V8cDerivedGetterSetterInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DerivedGetterSetterInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<bool >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -439,8 +370,9 @@
   }
 
   impl->set_property_on_derived_class(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -448,25 +380,18 @@
 void derivedIndexedGetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDerivedGetterSetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -488,7 +413,7 @@
     ToJSValue(isolate,
               impl->DerivedIndexedGetter(index),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -500,25 +425,18 @@
 void derivedIndexedSetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDerivedGetterSetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
   const size_t kMinArguments = 2;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -547,7 +465,7 @@
   }
 
   impl->DerivedIndexedSetter(index, value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -556,28 +474,21 @@
 void operationOnDerivedClassMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedGetterSetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDerivedGetterSetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedGetterSetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedGetterSetterInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedGetterSetterInterface* impl =
-      wrapper_private->wrappable<DerivedGetterSetterInterface>().get();
 
   impl->OperationOnDerivedClass();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -652,74 +563,44 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "length");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, lengthAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "length"
+                  ,lengthAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "propertyOnDerivedClass");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, propertyOnDerivedClassAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, propertyOnDerivedClassAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "propertyOnDerivedClass"
+                  ,propertyOnDerivedClassAttributeGetter
+                  ,propertyOnDerivedClassAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_interface.cc
index 1e1f37b..a38b1ba 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_derived_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -125,40 +126,20 @@
 
 void derivedAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DerivedInterface* impl =
-      wrapper_private->wrappable<DerivedInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DerivedInterface,
+                                                    V8cDerivedInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DerivedInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->derived_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -167,28 +148,21 @@
 void derivedOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDerivedInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDerivedInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DerivedInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DerivedInterface>(object);
+  if (!impl) {
     return;
   }
-  DerivedInterface* impl =
-      wrapper_private->wrappable<DerivedInterface>().get();
 
   impl->DerivedOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -264,38 +238,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "derivedAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, derivedAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "derivedAttribute"
+                  ,derivedAttributeAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dictionary_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dictionary_interface.cc
index 6e389bd..4a9a740 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dictionary_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dictionary_interface.cc
@@ -53,6 +53,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -116,67 +117,31 @@
 
 void dictionarySequenceAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDictionaryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DictionaryInterface* impl =
-      wrapper_private->wrappable<DictionaryInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DictionaryInterface,
+                                                    V8cDictionaryInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DictionaryInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->dictionary_sequence(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void dictionarySequenceAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDictionaryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DictionaryInterface* impl =
-      wrapper_private->wrappable<DictionaryInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DictionaryInterface, V8cDictionaryInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DictionaryInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::Sequence< TestDictionary > >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -185,8 +150,9 @@
   }
 
   impl->set_dictionary_sequence(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -194,25 +160,18 @@
 void derivedDictionaryOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDictionaryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDictionaryInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DictionaryInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DictionaryInterface>(object);
+  if (!impl) {
     return;
   }
-  DictionaryInterface* impl =
-      wrapper_private->wrappable<DictionaryInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -231,7 +190,7 @@
   }
 
   impl->DerivedDictionaryOperation(dictionary);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -240,25 +199,18 @@
 void dictionaryOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDictionaryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDictionaryInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DictionaryInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DictionaryInterface>(object);
+  if (!impl) {
     return;
   }
-  DictionaryInterface* impl =
-      wrapper_private->wrappable<DictionaryInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -277,7 +229,7 @@
   }
 
   impl->DictionaryOperation(dictionary);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -286,25 +238,18 @@
 void testOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDictionaryInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDictionaryInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DictionaryInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DictionaryInterface>(object);
+  if (!impl) {
     return;
   }
-  DictionaryInterface* impl =
-      wrapper_private->wrappable<DictionaryInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -323,7 +268,7 @@
   }
 
   impl->TestOperation(dict);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -383,39 +328,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "dictionarySequence");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, dictionarySequenceAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, dictionarySequenceAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "dictionarySequence"
+                  ,dictionarySequenceAttributeGetter
+                  ,dictionarySequenceAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_disabled_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_disabled_interface.cc
index cb69572..2d4bffe 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_disabled_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_disabled_interface.cc
@@ -53,6 +53,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -113,67 +114,31 @@
 
 void disabledPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDisabledInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DisabledInterface* impl =
-      wrapper_private->wrappable<DisabledInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DisabledInterface,
+                                                    V8cDisabledInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DisabledInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->disabled_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void disabledPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDisabledInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DisabledInterface* impl =
-      wrapper_private->wrappable<DisabledInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DisabledInterface, V8cDisabledInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DisabledInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -182,8 +147,9 @@
   }
 
   impl->set_disabled_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -191,28 +157,21 @@
 void disabledFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDisabledInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cDisabledInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  DisabledInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             DisabledInterface>(object);
+  if (!impl) {
     return;
   }
-  DisabledInterface* impl =
-      wrapper_private->wrappable<DisabledInterface>().get();
 
   impl->DisabledFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -272,39 +231,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "disabledProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, disabledPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, disabledPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "disabledProperty"
+                  ,disabledPropertyAttributeGetter
+                  ,disabledPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dom_string_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dom_string_test_interface.cc
index 624ea31..856fa69 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dom_string_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_dom_string_test_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,67 +111,31 @@
 
 void propertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void propertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DOMStringTestInterface, V8cDOMStringTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -179,154 +144,79 @@
   }
 
   impl->set_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void readOnlyPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->read_only_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void readOnlyTokenPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->read_only_token_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void nullIsEmptyPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->null_is_empty_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullIsEmptyPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DOMStringTestInterface, V8cDOMStringTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagTreatNullAsEmptyString), &exception_state,
               &value);
@@ -335,74 +225,39 @@
   }
 
   impl->set_null_is_empty_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void undefinedIsEmptyPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->undefined_is_empty_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void undefinedIsEmptyPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DOMStringTestInterface, V8cDOMStringTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagTreatUndefinedAsEmptyString), &exception_state,
               &value);
@@ -411,74 +266,39 @@
   }
 
   impl->set_undefined_is_empty_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableUndefinedIsEmptyPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<DOMStringTestInterface,
+                                                    V8cDOMStringTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_undefined_is_empty_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableUndefinedIsEmptyPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cDOMStringTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  DOMStringTestInterface* impl =
-      wrapper_private->wrappable<DOMStringTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<DOMStringTestInterface, V8cDOMStringTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, DOMStringTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<std::string > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable | kConversionFlagTreatUndefinedAsEmptyString), &exception_state,
               &value);
@@ -487,8 +307,9 @@
   }
 
   impl->set_nullable_undefined_is_empty_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -547,217 +368,127 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "property");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, propertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, propertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "property"
+                  ,propertyAttributeGetter
+                  ,propertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "readOnlyProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, readOnlyPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "readOnlyProperty"
+                  ,readOnlyPropertyAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "readOnlyTokenProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, readOnlyTokenPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "readOnlyTokenProperty"
+                  ,readOnlyTokenPropertyAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullIsEmptyProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullIsEmptyPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullIsEmptyPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullIsEmptyProperty"
+                  ,nullIsEmptyPropertyAttributeGetter
+                  ,nullIsEmptyPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "undefinedIsEmptyProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, undefinedIsEmptyPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, undefinedIsEmptyPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "undefinedIsEmptyProperty"
+                  ,undefinedIsEmptyPropertyAttributeGetter
+                  ,undefinedIsEmptyPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableUndefinedIsEmptyProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableUndefinedIsEmptyPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableUndefinedIsEmptyPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableUndefinedIsEmptyProperty"
+                  ,nullableUndefinedIsEmptyPropertyAttributeGetter
+                  ,nullableUndefinedIsEmptyPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_enumeration_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_enumeration_interface.cc
index 85ddfc5..c2e8669 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_enumeration_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_enumeration_interface.cc
@@ -51,6 +51,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -123,67 +124,31 @@
 
 void enumPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cEnumerationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  EnumerationInterface* impl =
-      wrapper_private->wrappable<EnumerationInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<EnumerationInterface,
+                                                    V8cEnumerationInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, EnumerationInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->enum_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void enumPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cEnumerationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  EnumerationInterface* impl =
-      wrapper_private->wrappable<EnumerationInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<EnumerationInterface, V8cEnumerationInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, EnumerationInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<TestEnum >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -192,8 +157,9 @@
   }
 
   impl->set_enum_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -201,43 +167,38 @@
 void optionalEnumWithDefaultMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cEnumerationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cEnumerationInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  EnumerationInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             EnumerationInterface>(object);
+  if (!impl) {
     return;
   }
-  EnumerationInterface* impl =
-      wrapper_private->wrappable<EnumerationInterface>().get();
   // Optional arguments with default values
   TypeTraits<TestEnum >::ConversionType value =
       kTestEnumBeta;
   size_t num_set_arguments = 1;
   if (info.Length() > 0) {
     v8::Local<v8::Value> optional_value0 = info[0];
-    FromJSValue(isolate,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &value);
+    if (!optional_value0->IsUndefined()) {
+      FromJSValue(isolate,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &value);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
   }
 
   impl->OptionalEnumWithDefault(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -298,39 +259,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "enumProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, enumPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, enumPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "enumProperty"
+                  ,enumPropertyAttributeGetter
+                  ,enumPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exception_object_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exception_object_interface.cc
index 2a19a04..996888b 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exception_object_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exception_object_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,80 +111,40 @@
 
 void errorAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExceptionObjectInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExceptionObjectInterface* impl =
-      wrapper_private->wrappable<ExceptionObjectInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ExceptionObjectInterface,
+                                                    V8cExceptionObjectInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExceptionObjectInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->error(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void messageAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExceptionObjectInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExceptionObjectInterface* impl =
-      wrapper_private->wrappable<ExceptionObjectInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ExceptionObjectInterface,
+                                                    V8cExceptionObjectInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExceptionObjectInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->message(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -233,12 +194,7 @@
     // A spicy hack from Chromium in order to achieve
     // https://heycam.github.io/webidl/#es-DOMException-specialness
     // See https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl?l=630&rcl=0f7c2c752bb24ad08c17017e4e68401093fe76a0
-    v8::Local<v8::FunctionTemplate> intrinsic_error_prototype_interface_template =
-        v8::FunctionTemplate::New(isolate);
-    intrinsic_error_prototype_interface_template->RemovePrototype();
-    intrinsic_error_prototype_interface_template->SetIntrinsicDataProperty(
-        NewInternalString(isolate, "prototype"), v8::kErrorPrototype);
-    function_template->Inherit(intrinsic_error_prototype_interface_template);
+    script::v8c::shared_bindings::set_intrinsic_error_prototype_interface_template(isolate, function_template);
   }
 
   // https://heycam.github.io/webidl/#es-constants
@@ -254,73 +210,43 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "error");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, errorAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "error"
+                  ,errorAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "message");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, messageAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "message"
+                  ,messageAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exceptions_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exceptions_interface.cc
index 9da312f..889822e 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exceptions_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_exceptions_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -125,67 +126,31 @@
 
 void attributeThrowsExceptionAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExceptionsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExceptionsInterface* impl =
-      wrapper_private->wrappable<ExceptionsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ExceptionsInterface,
+                                                    V8cExceptionsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExceptionsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->attribute_throws_exception(&exception_state),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void attributeThrowsExceptionAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExceptionsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExceptionsInterface* impl =
-      wrapper_private->wrappable<ExceptionsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ExceptionsInterface, V8cExceptionsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExceptionsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<bool >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -194,8 +159,9 @@
   }
 
   impl->set_attribute_throws_exception(value, &exception_state);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -203,28 +169,21 @@
 void functionThrowsExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExceptionsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cExceptionsInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ExceptionsInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ExceptionsInterface>(object);
+  if (!impl) {
     return;
   }
-  ExceptionsInterface* impl =
-      wrapper_private->wrappable<ExceptionsInterface>().get();
 
   impl->FunctionThrowsException(&exception_state);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -285,39 +244,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "attributeThrowsException");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, attributeThrowsExceptionAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, attributeThrowsExceptionAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "attributeThrowsException"
+                  ,attributeThrowsExceptionAttributeGetter
+                  ,attributeThrowsExceptionAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_extended_idl_attributes_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_extended_idl_attributes_interface.cc
index ef85bf5..70762e2 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_extended_idl_attributes_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_extended_idl_attributes_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,67 +111,31 @@
 
 void defaultAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExtendedIDLAttributesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExtendedIDLAttributesInterface* impl =
-      wrapper_private->wrappable<ExtendedIDLAttributesInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ExtendedIDLAttributesInterface,
+                                                    V8cExtendedIDLAttributesInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExtendedIDLAttributesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->attribute_default(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void defaultAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExtendedIDLAttributesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ExtendedIDLAttributesInterface* impl =
-      wrapper_private->wrappable<ExtendedIDLAttributesInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ExtendedIDLAttributesInterface, V8cExtendedIDLAttributesInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ExtendedIDLAttributesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<bool >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -179,8 +144,9 @@
   }
 
   impl->set_attribute_default(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -188,29 +154,22 @@
 void callWithSettingsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExtendedIDLAttributesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cExtendedIDLAttributesInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ExtendedIDLAttributesInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ExtendedIDLAttributesInterface>(object);
+  if (!impl) {
     return;
   }
-  ExtendedIDLAttributesInterface* impl =
-      wrapper_private->wrappable<ExtendedIDLAttributesInterface>().get();
   V8cGlobalEnvironment* callwith_global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
 
   impl->CallWithSettings(callwith_global_environment->GetEnvironmentSettings());
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -219,25 +178,18 @@
 void clampArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cExtendedIDLAttributesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cExtendedIDLAttributesInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  ExtendedIDLAttributesInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             ExtendedIDLAttributesInterface>(object);
+  if (!impl) {
     return;
   }
-  ExtendedIDLAttributesInterface* impl =
-      wrapper_private->wrappable<ExtendedIDLAttributesInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -256,7 +208,7 @@
   }
 
   impl->ClampArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -316,39 +268,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "default");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, defaultAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, defaultAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "default"
+                  ,defaultAttributeGetter
+                  ,defaultAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_garbage_collection_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_garbage_collection_test_interface.cc
index 50cbe7c..2119709 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_garbage_collection_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_garbage_collection_test_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -125,67 +126,31 @@
 
 void previousAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cGarbageCollectionTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  GarbageCollectionTestInterface* impl =
-      wrapper_private->wrappable<GarbageCollectionTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<GarbageCollectionTestInterface,
+                                                    V8cGarbageCollectionTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, GarbageCollectionTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->previous(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void previousAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cGarbageCollectionTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  GarbageCollectionTestInterface* impl =
-      wrapper_private->wrappable<GarbageCollectionTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<GarbageCollectionTestInterface, V8cGarbageCollectionTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, GarbageCollectionTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<scoped_refptr<GarbageCollectionTestInterface> >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -194,74 +159,39 @@
   }
 
   impl->set_previous(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nextAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cGarbageCollectionTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  GarbageCollectionTestInterface* impl =
-      wrapper_private->wrappable<GarbageCollectionTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<GarbageCollectionTestInterface,
+                                                    V8cGarbageCollectionTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, GarbageCollectionTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->next(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nextAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cGarbageCollectionTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  GarbageCollectionTestInterface* impl =
-      wrapper_private->wrappable<GarbageCollectionTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<GarbageCollectionTestInterface, V8cGarbageCollectionTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, GarbageCollectionTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<scoped_refptr<GarbageCollectionTestInterface> >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -270,8 +200,9 @@
   }
 
   impl->set_next(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -331,75 +262,45 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "previous");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, previousAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, previousAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "previous"
+                  ,previousAttributeGetter
+                  ,previousAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "next");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nextAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nextAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "next"
+                  ,nextAttributeGetter
+                  ,nextAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_global_interface_parent.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_global_interface_parent.cc
index b07760f..2692728 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_global_interface_parent.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_global_interface_parent.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -112,28 +113,21 @@
 void parentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cGlobalInterfaceParent::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cGlobalInterfaceParent::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  GlobalInterfaceParent* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             GlobalInterfaceParent>(object);
+  if (!impl) {
     return;
   }
-  GlobalInterfaceParent* impl =
-      wrapper_private->wrappable<GlobalInterfaceParent>().get();
 
   impl->ParentOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_indexed_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_indexed_getter_interface.cc
index 5588dc1..960e6aa 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_indexed_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -105,14 +106,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   if (index >= impl->length()) {
     // |index| is out of bounds, so return undefined.
     return;
@@ -122,7 +121,7 @@
     ToJSValue(isolate,
               impl->IndexedGetter(index),
               &result_value);
-  }
+}
   info.GetReturnValue().Set(result_value);
 }
 
@@ -137,14 +136,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   const uint32_t length = impl->length();
   v8::Local<v8::Array> array = v8::Array::New(isolate, length);
   for (uint32_t i = 0; i < length; ++i) {
@@ -171,14 +168,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
@@ -190,7 +185,7 @@
   }
 
   impl->IndexedSetter(index, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -205,20 +200,18 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
 
   impl->IndexedDeleter(index);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -236,40 +229,20 @@
 
 void lengthAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<IndexedGetterInterface,
+                                                    V8cIndexedGetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, IndexedGetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->length(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -278,25 +251,18 @@
 void indexedDeleterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -315,7 +281,7 @@
   }
 
   impl->IndexedDeleter(index);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -324,25 +290,18 @@
 void indexedGetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -364,7 +323,7 @@
     ToJSValue(isolate,
               impl->IndexedGetter(index),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -376,25 +335,18 @@
 void indexedSetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  IndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             IndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  IndexedGetterInterface* impl =
-      wrapper_private->wrappable<IndexedGetterInterface>().get();
   const size_t kMinArguments = 2;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -423,7 +375,7 @@
   }
 
   impl->IndexedSetter(index, value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -483,38 +435,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "length");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, lengthAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "length"
+                  ,lengthAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any.cc
index 19e7249..9815598 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -123,31 +124,24 @@
 void getAnyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAny::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAny::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAny* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAny>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAny* impl =
-      wrapper_private->wrappable<InterfaceWithAny>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetAny(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -159,25 +153,18 @@
 void setAnyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAny::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAny::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAny* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAny>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAny* impl =
-      wrapper_private->wrappable<InterfaceWithAny>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -196,7 +183,7 @@
   }
 
   impl->SetAny(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any_dictionary.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any_dictionary.cc
index 89200e8..caee69f 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any_dictionary.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_any_dictionary.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -123,31 +124,24 @@
 void getAnyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAnyDictionary::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAnyDictionary::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAnyDictionary* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAnyDictionary>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAnyDictionary* impl =
-      wrapper_private->wrappable<InterfaceWithAnyDictionary>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetAny(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -159,31 +153,24 @@
 void hasAnyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAnyDictionary::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAnyDictionary::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAnyDictionary* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAnyDictionary>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAnyDictionary* impl =
-      wrapper_private->wrappable<InterfaceWithAnyDictionary>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->HasAny(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -195,31 +182,24 @@
 void hasAnyDefaultMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAnyDictionary::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAnyDictionary::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAnyDictionary* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAnyDictionary>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAnyDictionary* impl =
-      wrapper_private->wrappable<InterfaceWithAnyDictionary>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->HasAnyDefault(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -231,25 +211,18 @@
 void setAnyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithAnyDictionary::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithAnyDictionary::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithAnyDictionary* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithAnyDictionary>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithAnyDictionary* impl =
-      wrapper_private->wrappable<InterfaceWithAnyDictionary>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -268,7 +241,7 @@
   }
 
   impl->SetAny(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_date.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_date.cc
index 69c9991..2d0756e 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_date.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_date.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -123,31 +124,24 @@
 void getDateMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithDate::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithDate::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithDate* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithDate>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithDate* impl =
-      wrapper_private->wrappable<InterfaceWithDate>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetDate(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -159,25 +153,18 @@
 void setDateMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithDate::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cInterfaceWithDate::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  InterfaceWithDate* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             InterfaceWithDate>(object);
+  if (!impl) {
     return;
   }
-  InterfaceWithDate* impl =
-      wrapper_private->wrappable<InterfaceWithDate>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -196,7 +183,7 @@
   }
 
   impl->SetDate(date);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_unsupported_properties.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_unsupported_properties.cc
index 76f8964..6f2c401 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_unsupported_properties.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_interface_with_unsupported_properties.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,40 +111,20 @@
 
 void supportedAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cInterfaceWithUnsupportedProperties::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  InterfaceWithUnsupportedProperties* impl =
-      wrapper_private->wrappable<InterfaceWithUnsupportedProperties>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<InterfaceWithUnsupportedProperties,
+                                                    V8cInterfaceWithUnsupportedProperties>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, InterfaceWithUnsupportedProperties* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->supported_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
@@ -203,38 +184,23 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "supportedAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, supportedAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "supportedAttribute"
+                  ,supportedAttributeAttributeGetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_constructor_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_constructor_interface.cc
index 60b60c8..8889530 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_constructor_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_getter_interface.cc
index d663fc2..efafcad 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -102,14 +103,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
@@ -119,7 +118,7 @@
     ToJSValue(isolate,
               impl->NamedGetter(property_name),
               &result_value);
-  }
+}
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -138,14 +137,12 @@
     const v8::PropertyCallbackInfo<v8::Integer>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   bool result = impl->CanQueryNamedProperty(property_name);
   if (!result) {
@@ -174,14 +171,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   v8::Local<v8::Array> array = v8::Array::New(isolate);
   V8cPropertyEnumerator property_enumerator(isolate, &array);
   impl->EnumerateNamedProperties(&property_enumerator);
@@ -198,14 +193,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   TypeTraits<std::string>::ConversionType native_value;
   FromJSValue(isolate, value, kNoConversionFlags,
@@ -215,7 +208,7 @@
   }
 
   impl->NamedSetter(property_name, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -239,21 +232,19 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
   }
 
   impl->NamedDeleter(property_name);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -285,25 +276,18 @@
 void namedDeleterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -322,7 +306,7 @@
   }
 
   impl->NamedDeleter(name);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -331,25 +315,18 @@
 void namedGetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -371,7 +348,7 @@
     ToJSValue(isolate,
               impl->NamedGetter(name),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -383,25 +360,18 @@
 void namedSetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedGetterInterface* impl =
-      wrapper_private->wrappable<NamedGetterInterface>().get();
   const size_t kMinArguments = 2;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -430,7 +400,7 @@
   }
 
   impl->NamedSetter(name, value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_indexed_getter_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_indexed_getter_interface.cc
index e38e088..cb2a42d 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_indexed_getter_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_named_indexed_getter_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -102,14 +103,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   if (!impl->CanQueryNamedProperty(property_name)) {
     return;
@@ -119,7 +118,7 @@
     ToJSValue(isolate,
               impl->NamedGetter(property_name),
               &result_value);
-  }
+}
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -132,14 +131,12 @@
     const v8::PropertyCallbackInfo<v8::Integer>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   bool result = impl->CanQueryNamedProperty(property_name);
   if (!result) {
@@ -162,14 +159,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   v8::Local<v8::Array> array = v8::Array::New(isolate);
   V8cPropertyEnumerator property_enumerator(isolate, &array);
   impl->EnumerateNamedProperties(&property_enumerator);
@@ -186,14 +181,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   std::string property_name = *v8::String::Utf8Value(isolate, property);
   TypeTraits<std::string>::ConversionType native_value;
   FromJSValue(isolate, value, kNoConversionFlags,
@@ -203,7 +196,7 @@
   }
 
   impl->NamedSetter(property_name, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -222,14 +215,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     // |index| is out of bounds, so return undefined.
     return;
@@ -239,7 +230,7 @@
     ToJSValue(isolate,
               impl->IndexedGetter(index),
               &result_value);
-  }
+}
   info.GetReturnValue().Set(result_value);
 }
 
@@ -254,14 +245,12 @@
     const v8::PropertyCallbackInfo<v8::Array>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   const uint32_t length = impl->length();
   v8::Local<v8::Array> array = v8::Array::New(isolate, length);
   for (uint32_t i = 0; i < length; ++i) {
@@ -288,14 +277,12 @@
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   if (index >= impl->length()) {
     return;
   }
@@ -307,7 +294,7 @@
   }
 
   impl->IndexedSetter(index, native_value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   if (exception_state.is_exception_set()) {
     return;
   }
@@ -326,107 +313,51 @@
 
 void lengthAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NamedIndexedGetterInterface,
+                                                    V8cNamedIndexedGetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NamedIndexedGetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->length(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void propertyOnBaseClassAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NamedIndexedGetterInterface,
+                                                    V8cNamedIndexedGetterInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NamedIndexedGetterInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->property_on_base_class(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void propertyOnBaseClassAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NamedIndexedGetterInterface, V8cNamedIndexedGetterInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NamedIndexedGetterInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<bool >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -435,8 +366,9 @@
   }
 
   impl->set_property_on_base_class(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -444,25 +376,18 @@
 void indexedGetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -484,7 +409,7 @@
     ToJSValue(isolate,
               impl->IndexedGetter(index),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -496,25 +421,18 @@
 void indexedSetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   const size_t kMinArguments = 2;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -543,7 +461,7 @@
   }
 
   impl->IndexedSetter(index, value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -552,25 +470,18 @@
 void namedGetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -592,7 +503,7 @@
     ToJSValue(isolate,
               impl->NamedGetter(name),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -604,25 +515,18 @@
 void namedSetterMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
   const size_t kMinArguments = 2;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -651,7 +555,7 @@
   }
 
   impl->NamedSetter(name, value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -660,28 +564,21 @@
 void operationOnBaseClassMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNamedIndexedGetterInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNamedIndexedGetterInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NamedIndexedGetterInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NamedIndexedGetterInterface>(object);
+  if (!impl) {
     return;
   }
-  NamedIndexedGetterInterface* impl =
-      wrapper_private->wrappable<NamedIndexedGetterInterface>().get();
 
   impl->OperationOnBaseClass();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -741,74 +638,44 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "length");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, lengthAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "length"
+                  ,lengthAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "propertyOnBaseClass");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, propertyOnBaseClassAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, propertyOnBaseClassAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "propertyOnBaseClass"
+                  ,propertyOnBaseClassAttributeGetter
+                  ,propertyOnBaseClassAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nested_put_forwards_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nested_put_forwards_interface.cc
index d01a524..0d1fc79 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nested_put_forwards_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nested_put_forwards_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,67 +115,31 @@
 
 void nestedForwardingAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNestedPutForwardsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NestedPutForwardsInterface* impl =
-      wrapper_private->wrappable<NestedPutForwardsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NestedPutForwardsInterface,
+                                                    V8cNestedPutForwardsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NestedPutForwardsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nested_forwarding_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nestedForwardingAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNestedPutForwardsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NestedPutForwardsInterface* impl =
-      wrapper_private->wrappable<NestedPutForwardsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NestedPutForwardsInterface, V8cNestedPutForwardsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NestedPutForwardsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   { // Begin scope of scoped_refptr<PutForwardsInterface> forwarded_impl.
     scoped_refptr<PutForwardsInterface> forwarded_impl =
        impl->nested_forwarding_attribute();
@@ -199,7 +164,7 @@
   }
 
   forwarded_forwarded_impl->set_arbitrary_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
 }
     return;
@@ -207,6 +172,7 @@
 }
     return;
   } // End scope of scoped_refptr<PutForwardsInterface> forwarded_impl.
+});
 }
 
 
@@ -265,39 +231,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nestedForwardingAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nestedForwardingAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nestedForwardingAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nestedForwardingAttribute"
+                  ,nestedForwardingAttributeAttributeGetter
+                  ,nestedForwardingAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_constructor_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_constructor_interface.cc
index a451d14..32869a1 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_constructor_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_constructor_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_interface_object_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_interface_object_interface.cc
index 8107531..d105c81 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_interface_object_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_no_interface_object_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nullable_types_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nullable_types_test_interface.cc
index d1e376e..07ec89c 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nullable_types_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_nullable_types_test_interface.cc
@@ -53,6 +53,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -116,67 +117,31 @@
 
 void nullableBooleanPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NullableTypesTestInterface,
+                                                    V8cNullableTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_boolean_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableBooleanPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NullableTypesTestInterface, V8cNullableTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<bool > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -185,74 +150,39 @@
   }
 
   impl->set_nullable_boolean_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableNumericPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NullableTypesTestInterface,
+                                                    V8cNullableTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_numeric_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableNumericPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NullableTypesTestInterface, V8cNullableTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<int32_t > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -261,74 +191,39 @@
   }
 
   impl->set_nullable_numeric_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableStringPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NullableTypesTestInterface,
+                                                    V8cNullableTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_string_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableStringPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NullableTypesTestInterface, V8cNullableTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<std::string > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -337,74 +232,39 @@
   }
 
   impl->set_nullable_string_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableDictionaryPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NullableTypesTestInterface,
+                                                    V8cNullableTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_dictionary_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableDictionaryPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NullableTypesTestInterface, V8cNullableTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<TestDictionary > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -413,74 +273,39 @@
   }
 
   impl->set_nullable_dictionary_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableObjectPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NullableTypesTestInterface,
+                                                    V8cNullableTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_object_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableObjectPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NullableTypesTestInterface, V8cNullableTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NullableTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<scoped_refptr<ArbitraryInterface> >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -489,8 +314,9 @@
   }
 
   impl->set_nullable_object_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -498,25 +324,18 @@
 void nullableBooleanArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -535,7 +354,7 @@
   }
 
   impl->NullableBooleanArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -544,31 +363,24 @@
 void nullableBooleanOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->NullableBooleanOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -580,25 +392,18 @@
 void nullableDictionaryArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -617,7 +422,7 @@
   }
 
   impl->NullableDictionaryArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -626,31 +431,24 @@
 void nullableDictionaryOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->NullableDictionaryOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -662,25 +460,18 @@
 void nullableNumericArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -699,7 +490,7 @@
   }
 
   impl->NullableNumericArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -708,31 +499,24 @@
 void nullableNumericOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->NullableNumericOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -744,25 +528,18 @@
 void nullableObjectArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -781,7 +558,7 @@
   }
 
   impl->NullableObjectArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -790,31 +567,24 @@
 void nullableObjectOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->NullableObjectOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -826,25 +596,18 @@
 void nullableStringArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -863,7 +626,7 @@
   }
 
   impl->NullableStringArgument(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -872,31 +635,24 @@
 void nullableStringOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNullableTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNullableTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NullableTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NullableTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NullableTypesTestInterface* impl =
-      wrapper_private->wrappable<NullableTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->NullableStringOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -959,183 +715,108 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableBooleanProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableBooleanPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableBooleanPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableBooleanProperty"
+                  ,nullableBooleanPropertyAttributeGetter
+                  ,nullableBooleanPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableNumericProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableNumericPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableNumericPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableNumericProperty"
+                  ,nullableNumericPropertyAttributeGetter
+                  ,nullableNumericPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableStringProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableStringPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableStringPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableStringProperty"
+                  ,nullableStringPropertyAttributeGetter
+                  ,nullableStringPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableDictionaryProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableDictionaryPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableDictionaryPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableDictionaryProperty"
+                  ,nullableDictionaryPropertyAttributeGetter
+                  ,nullableDictionaryPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableObjectProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableObjectPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableObjectPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableObjectProperty"
+                  ,nullableObjectPropertyAttributeGetter
+                  ,nullableObjectPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_numeric_types_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_numeric_types_test_interface.cc
index d63da1b..ac35ce5 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_numeric_types_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_numeric_types_test_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,67 +111,31 @@
 
 void bytePropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->byte_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void bytePropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int8_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -179,74 +144,39 @@
   }
 
   impl->set_byte_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void byteClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->byte_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void byteClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int8_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -255,74 +185,39 @@
   }
 
   impl->set_byte_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void octetPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->octet_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void octetPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint8_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -331,74 +226,39 @@
   }
 
   impl->set_octet_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void octetClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->octet_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void octetClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint8_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -407,74 +267,39 @@
   }
 
   impl->set_octet_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void shortPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->short_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void shortPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int16_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -483,74 +308,39 @@
   }
 
   impl->set_short_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void shortClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->short_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void shortClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int16_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -559,74 +349,39 @@
   }
 
   impl->set_short_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedShortPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_short_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedShortPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint16_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -635,74 +390,39 @@
   }
 
   impl->set_unsigned_short_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedShortClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_short_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedShortClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint16_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -711,74 +431,39 @@
   }
 
   impl->set_unsigned_short_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void longPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->long_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void longPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -787,74 +472,39 @@
   }
 
   impl->set_long_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void longClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->long_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void longClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -863,74 +513,39 @@
   }
 
   impl->set_long_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedLongPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_long_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedLongPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -939,74 +554,39 @@
   }
 
   impl->set_unsigned_long_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedLongClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_long_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedLongClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint32_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -1015,74 +595,39 @@
   }
 
   impl->set_unsigned_long_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void longLongPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->long_long_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void longLongPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int64_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -1091,74 +636,39 @@
   }
 
   impl->set_long_long_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void longLongClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->long_long_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void longLongClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<int64_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -1167,74 +677,39 @@
   }
 
   impl->set_long_long_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedLongLongPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_long_long_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedLongLongPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint64_t >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -1243,74 +718,39 @@
   }
 
   impl->set_unsigned_long_long_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unsignedLongLongClampPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unsigned_long_long_clamp_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unsignedLongLongClampPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<uint64_t >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagClamped), &exception_state,
               &value);
@@ -1319,74 +759,39 @@
   }
 
   impl->set_unsigned_long_long_clamp_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void doublePropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->double_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void doublePropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<double >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagRestricted), &exception_state,
               &value);
@@ -1395,74 +800,39 @@
   }
 
   impl->set_double_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unrestrictedDoublePropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<NumericTypesTestInterface,
+                                                    V8cNumericTypesTestInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->unrestricted_double_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unrestrictedDoublePropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<NumericTypesTestInterface, V8cNumericTypesTestInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, NumericTypesTestInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<double >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -1471,8 +841,9 @@
   }
 
   impl->set_unrestricted_double_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -1480,25 +851,18 @@
 void byteArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1517,7 +881,7 @@
   }
 
   impl->ByteArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1526,31 +890,24 @@
 void byteReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ByteReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1562,25 +919,18 @@
 void doubleArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1599,7 +949,7 @@
   }
 
   impl->DoubleArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1608,31 +958,24 @@
 void doubleReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->DoubleReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1644,25 +987,18 @@
 void longArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1681,7 +1017,7 @@
   }
 
   impl->LongArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1690,25 +1026,18 @@
 void longLongArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1727,7 +1056,7 @@
   }
 
   impl->LongLongArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1736,31 +1065,24 @@
 void longLongReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->LongLongReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1772,31 +1094,24 @@
 void longReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->LongReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1808,25 +1123,18 @@
 void octetArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1845,7 +1153,7 @@
   }
 
   impl->OctetArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1854,31 +1162,24 @@
 void octetReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->OctetReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1890,25 +1191,18 @@
 void shortArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1927,7 +1221,7 @@
   }
 
   impl->ShortArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1936,31 +1230,24 @@
 void shortReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ShortReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -1972,25 +1259,18 @@
 void unrestrictedDoubleArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -2009,7 +1289,7 @@
   }
 
   impl->UnrestrictedDoubleArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -2018,31 +1298,24 @@
 void unrestrictedDoubleReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->UnrestrictedDoubleReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -2054,25 +1327,18 @@
 void unsignedLongArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -2091,7 +1357,7 @@
   }
 
   impl->UnsignedLongArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -2100,25 +1366,18 @@
 void unsignedLongLongArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -2137,7 +1396,7 @@
   }
 
   impl->UnsignedLongLongArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -2146,31 +1405,24 @@
 void unsignedLongLongReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->UnsignedLongLongReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -2182,31 +1434,24 @@
 void unsignedLongReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->UnsignedLongReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -2218,25 +1463,18 @@
 void unsignedShortArgumentOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -2255,7 +1493,7 @@
   }
 
   impl->UnsignedShortArgumentOperation(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -2264,31 +1502,24 @@
 void unsignedShortReturnOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cNumericTypesTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cNumericTypesTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  NumericTypesTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             NumericTypesTestInterface>(object);
+  if (!impl) {
     return;
   }
-  NumericTypesTestInterface* impl =
-      wrapper_private->wrappable<NumericTypesTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->UnsignedShortReturnOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -2351,651 +1582,381 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "byteProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, bytePropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, bytePropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "byteProperty"
+                  ,bytePropertyAttributeGetter
+                  ,bytePropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "byteClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, byteClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, byteClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "byteClampProperty"
+                  ,byteClampPropertyAttributeGetter
+                  ,byteClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "octetProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, octetPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, octetPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "octetProperty"
+                  ,octetPropertyAttributeGetter
+                  ,octetPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "octetClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, octetClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, octetClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "octetClampProperty"
+                  ,octetClampPropertyAttributeGetter
+                  ,octetClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "shortProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, shortPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, shortPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "shortProperty"
+                  ,shortPropertyAttributeGetter
+                  ,shortPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "shortClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, shortClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, shortClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "shortClampProperty"
+                  ,shortClampPropertyAttributeGetter
+                  ,shortClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedShortProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedShortPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedShortPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedShortProperty"
+                  ,unsignedShortPropertyAttributeGetter
+                  ,unsignedShortPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedShortClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedShortClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedShortClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedShortClampProperty"
+                  ,unsignedShortClampPropertyAttributeGetter
+                  ,unsignedShortClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "longProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, longPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, longPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "longProperty"
+                  ,longPropertyAttributeGetter
+                  ,longPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "longClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, longClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, longClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "longClampProperty"
+                  ,longClampPropertyAttributeGetter
+                  ,longClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedLongProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedLongPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedLongPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedLongProperty"
+                  ,unsignedLongPropertyAttributeGetter
+                  ,unsignedLongPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedLongClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedLongClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedLongClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedLongClampProperty"
+                  ,unsignedLongClampPropertyAttributeGetter
+                  ,unsignedLongClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "longLongProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, longLongPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, longLongPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "longLongProperty"
+                  ,longLongPropertyAttributeGetter
+                  ,longLongPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "longLongClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, longLongClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, longLongClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "longLongClampProperty"
+                  ,longLongClampPropertyAttributeGetter
+                  ,longLongClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedLongLongProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedLongLongPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedLongLongPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedLongLongProperty"
+                  ,unsignedLongLongPropertyAttributeGetter
+                  ,unsignedLongLongPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unsignedLongLongClampProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unsignedLongLongClampPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unsignedLongLongClampPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unsignedLongLongClampProperty"
+                  ,unsignedLongLongClampPropertyAttributeGetter
+                  ,unsignedLongLongClampPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "doubleProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, doublePropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, doublePropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "doubleProperty"
+                  ,doublePropertyAttributeGetter
+                  ,doublePropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unrestrictedDoubleProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unrestrictedDoublePropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unrestrictedDoublePropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unrestrictedDoubleProperty"
+                  ,unrestrictedDoublePropertyAttributeGetter
+                  ,unrestrictedDoublePropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_object_type_bindings_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_object_type_bindings_interface.cc
index 4162e1d..6542141 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_object_type_bindings_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_object_type_bindings_interface.cc
@@ -56,6 +56,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -122,67 +123,31 @@
 
 void arbitraryObjectAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ObjectTypeBindingsInterface,
+                                                    V8cObjectTypeBindingsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->arbitrary_object(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void arbitraryObjectAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ObjectTypeBindingsInterface, V8cObjectTypeBindingsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<scoped_refptr<ArbitraryInterface> >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -191,114 +156,59 @@
   }
 
   impl->set_arbitrary_object(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void baseInterfaceAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ObjectTypeBindingsInterface,
+                                                    V8cObjectTypeBindingsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->base_interface(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void derivedInterfaceAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ObjectTypeBindingsInterface,
+                                                    V8cObjectTypeBindingsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->derived_interface(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void derivedInterfaceAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ObjectTypeBindingsInterface, V8cObjectTypeBindingsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<scoped_refptr<DerivedInterface> >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -307,74 +217,39 @@
   }
 
   impl->set_derived_interface(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void objectPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<ObjectTypeBindingsInterface,
+                                                    V8cObjectTypeBindingsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->object_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void objectPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cObjectTypeBindingsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  ObjectTypeBindingsInterface* impl =
-      wrapper_private->wrappable<ObjectTypeBindingsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<ObjectTypeBindingsInterface, V8cObjectTypeBindingsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, ObjectTypeBindingsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::ValueHandle >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable | kConversionFlagObjectOnly), &exception_state,
               &value);
@@ -383,8 +258,9 @@
   }
 
   impl->set_object_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -443,146 +319,86 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "arbitraryObject");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, arbitraryObjectAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, arbitraryObjectAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "arbitraryObject"
+                  ,arbitraryObjectAttributeGetter
+                  ,arbitraryObjectAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "baseInterface");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, baseInterfaceAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "baseInterface"
+                  ,baseInterfaceAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "derivedInterface");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, derivedInterfaceAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, derivedInterfaceAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "derivedInterface"
+                  ,derivedInterfaceAttributeGetter
+                  ,derivedInterfaceAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "objectProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, objectPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, objectPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "objectProperty"
+                  ,objectPropertyAttributeGetter
+                  ,objectPropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_operations_test_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_operations_test_interface.cc
index fb718c6..4f4e6e1 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_operations_test_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_operations_test_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -116,31 +117,24 @@
 void longFunctionNoArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->LongFunctionNoArgs(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -152,31 +146,24 @@
 void objectFunctionNoArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ObjectFunctionNoArgs(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -188,43 +175,38 @@
 void optionalArgumentWithDefaultMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   // Optional arguments with default values
   TypeTraits<double >::ConversionType arg1 =
       2.718;
   size_t num_set_arguments = 1;
   if (info.Length() > 0) {
     v8::Local<v8::Value> optional_value0 = info[0];
-    FromJSValue(isolate,
-                optional_value0,
-                (kConversionFlagRestricted),
-                &exception_state,
-                &arg1);
+    if (!optional_value0->IsUndefined()) {
+      FromJSValue(isolate,
+                  optional_value0,
+                  (kConversionFlagRestricted),
+                  &exception_state,
+                  &arg1);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
   }
 
   impl->OptionalArgumentWithDefault(arg1);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -233,25 +215,18 @@
 void optionalArgumentsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -274,11 +249,13 @@
   size_t num_set_arguments = 1;
   if (info.Length() > 1) {
     v8::Local<v8::Value> optional_value0 = info[1];
-    FromJSValue(isolate,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &arg2);
+    {
+      FromJSValue(isolate,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &arg2);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -286,11 +263,13 @@
   }
   if (info.Length() > 2) {
     v8::Local<v8::Value> optional_value1 = info[2];
-    FromJSValue(isolate,
-                optional_value1,
-                kNoConversionFlags,
-                &exception_state,
-                &arg3);
+    {
+      FromJSValue(isolate,
+                  optional_value1,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &arg3);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -300,19 +279,19 @@
     case 1:
       {
           impl->OptionalArguments(arg1);
-          result_value = v8::Undefined(isolate);
+        result_value = v8::Undefined(isolate);
       }
       break;
     case 2:
       {
           impl->OptionalArguments(arg1, arg2);
-          result_value = v8::Undefined(isolate);
+        result_value = v8::Undefined(isolate);
       }
       break;
     case 3:
       {
           impl->OptionalArguments(arg1, arg2, arg3);
-          result_value = v8::Undefined(isolate);
+        result_value = v8::Undefined(isolate);
       }
       break;
     default:
@@ -326,25 +305,18 @@
 void optionalNullableArgumentsWithDefaultsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   // Optional arguments with default values
   TypeTraits<base::Optional<bool > >::ConversionType arg1 =
       base::nullopt;
@@ -353,29 +325,33 @@
   size_t num_set_arguments = 2;
   if (info.Length() > 0) {
     v8::Local<v8::Value> optional_value0 = info[0];
-    FromJSValue(isolate,
-                optional_value0,
-                (kConversionFlagNullable),
-                &exception_state,
-                &arg1);
+    if (!optional_value0->IsUndefined()) {
+      FromJSValue(isolate,
+                  optional_value0,
+                  (kConversionFlagNullable),
+                  &exception_state,
+                  &arg1);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
   }
   if (info.Length() > 1) {
     v8::Local<v8::Value> optional_value1 = info[1];
-    FromJSValue(isolate,
-                optional_value1,
-                (kConversionFlagNullable),
-                &exception_state,
-                &arg2);
+    if (!optional_value1->IsUndefined()) {
+      FromJSValue(isolate,
+                  optional_value1,
+                  (kConversionFlagNullable),
+                  &exception_state,
+                  &arg2);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
   }
 
   impl->OptionalNullableArgumentsWithDefaults(arg1, arg2);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -384,53 +360,39 @@
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
 
   impl->OverloadedFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedFunctionMethod2(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -449,32 +411,25 @@
   }
 
   impl->OverloadedFunction(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedFunctionMethod3(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -493,32 +448,25 @@
   }
 
   impl->OverloadedFunction(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedFunctionMethod4(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 3;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -557,32 +505,25 @@
   }
 
   impl->OverloadedFunction(arg1, arg2, arg3);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedFunctionMethod5(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 3;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -621,7 +562,7 @@
   }
 
   impl->OverloadedFunction(arg1, arg2, arg3);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -643,9 +584,7 @@
       // Overload resolution algorithm details found here:
       //     http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
       v8::Local<v8::Value> arg = info[0];
-      V8cGlobalEnvironment* global_environment =
-          V8cGlobalEnvironment::GetFromIsolate(isolate);
-      WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
+      WrapperFactory* wrapper_factory = V8cGlobalEnvironment::GetFromIsolate(isolate)->wrapper_factory();
       v8::Local<v8::Object> object;
       if (arg->IsObject()) {
         object = arg->ToObject();
@@ -671,9 +610,7 @@
       // Overload resolution algorithm details found here:
       //     http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
       v8::Local<v8::Value> arg = info[2];
-      V8cGlobalEnvironment* global_environment =
-          V8cGlobalEnvironment::GetFromIsolate(isolate);
-      WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
+      WrapperFactory* wrapper_factory = V8cGlobalEnvironment::GetFromIsolate(isolate)->wrapper_factory();
       v8::Local<v8::Object> object;
       if (arg->IsObject()) {
         object = arg->ToObject();
@@ -704,25 +641,18 @@
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -741,32 +671,25 @@
   }
 
   impl->OverloadedNullable(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedNullableMethod2(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -785,7 +708,7 @@
   }
 
   impl->OverloadedNullable(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -797,9 +720,7 @@
       // Overload resolution algorithm details found here:
       //     http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
       v8::Local<v8::Value> arg = info[0];
-      V8cGlobalEnvironment* global_environment =
-          V8cGlobalEnvironment::GetFromIsolate(isolate);
-      WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
+      WrapperFactory* wrapper_factory = V8cGlobalEnvironment::GetFromIsolate(isolate)->wrapper_factory();
       v8::Local<v8::Object> object;
       if (arg->IsObject()) {
         object = arg->ToObject();
@@ -830,31 +751,24 @@
 void stringFunctionNoArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->StringFunctionNoArgs(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -866,25 +780,18 @@
 void variadicPrimitiveArgumentsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   // Variadic argument
   TypeTraits<std::vector<int32_t> >::ConversionType bools;
 
@@ -906,7 +813,7 @@
   }
 
   impl->VariadicPrimitiveArguments(bools);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -915,25 +822,18 @@
 void variadicStringArgumentsAfterOptionalArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   // Optional arguments
   TypeTraits<bool >::ConversionType optionalArg;
   // Variadic argument
@@ -941,11 +841,13 @@
   size_t num_set_arguments = 0;
   if (info.Length() > 0) {
     v8::Local<v8::Value> optional_value0 = info[0];
-    FromJSValue(isolate,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &optionalArg);
+    {
+      FromJSValue(isolate,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &optionalArg);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -979,13 +881,13 @@
     case 0:
       {
           impl->VariadicStringArgumentsAfterOptionalArgument();
-          result_value = v8::Undefined(isolate);
+        result_value = v8::Undefined(isolate);
       }
       break;
     case 2:
       {
           impl->VariadicStringArgumentsAfterOptionalArgument(optionalArg, strings);
-          result_value = v8::Undefined(isolate);
+        result_value = v8::Undefined(isolate);
       }
       break;
     default:
@@ -999,25 +901,18 @@
 void voidFunctionLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1036,7 +931,7 @@
   }
 
   impl->VoidFunctionLongArg(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1045,28 +940,21 @@
 void voidFunctionNoArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
 
   impl->VoidFunctionNoArgs();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1075,25 +963,18 @@
 void voidFunctionObjectArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1112,7 +993,7 @@
   }
 
   impl->VoidFunctionObjectArg(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1121,25 +1002,18 @@
 void voidFunctionStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cOperationsTestInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cOperationsTestInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  OperationsTestInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             OperationsTestInterface>(object);
+  if (!impl) {
     return;
   }
-  OperationsTestInterface* impl =
-      wrapper_private->wrappable<OperationsTestInterface>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -1158,7 +1032,7 @@
   }
 
   impl->VoidFunctionStringArg(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -1187,7 +1061,7 @@
   }
 
   OperationsTestInterface::OverloadedFunction(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void overloadedFunctionStaticMethod2(
@@ -1224,7 +1098,7 @@
   }
 
   OperationsTestInterface::OverloadedFunction(arg1, arg2);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_promise_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_promise_interface.cc
index be33c06..e8f7ad5 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_promise_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_promise_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -112,28 +113,21 @@
 void onSuccessMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPromiseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cPromiseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  PromiseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             PromiseInterface>(object);
+  if (!impl) {
     return;
   }
-  PromiseInterface* impl =
-      wrapper_private->wrappable<PromiseInterface>().get();
 
   impl->OnSuccess();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -142,31 +136,24 @@
 void returnBooleanPromiseMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPromiseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cPromiseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  PromiseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             PromiseInterface>(object);
+  if (!impl) {
     return;
   }
-  PromiseInterface* impl =
-      wrapper_private->wrappable<PromiseInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ReturnBooleanPromise(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -178,31 +165,24 @@
 void returnInterfacePromiseMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPromiseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cPromiseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  PromiseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             PromiseInterface>(object);
+  if (!impl) {
     return;
   }
-  PromiseInterface* impl =
-      wrapper_private->wrappable<PromiseInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ReturnInterfacePromise(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -214,31 +194,24 @@
 void returnStringPromiseMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPromiseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cPromiseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  PromiseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             PromiseInterface>(object);
+  if (!impl) {
     return;
   }
-  PromiseInterface* impl =
-      wrapper_private->wrappable<PromiseInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ReturnStringPromise(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -250,31 +223,24 @@
 void returnVoidPromiseMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPromiseInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cPromiseInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  PromiseInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             PromiseInterface>(object);
+  if (!impl) {
     return;
   }
-  PromiseInterface* impl =
-      wrapper_private->wrappable<PromiseInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->ReturnVoidPromise(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_put_forwards_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_put_forwards_interface.cc
index 3387251..b9a59f0 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_put_forwards_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_put_forwards_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,67 +115,31 @@
 
 void forwardingAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPutForwardsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  PutForwardsInterface* impl =
-      wrapper_private->wrappable<PutForwardsInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<PutForwardsInterface,
+                                                    V8cPutForwardsInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, PutForwardsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->forwarding_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void forwardingAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cPutForwardsInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  PutForwardsInterface* impl =
-      wrapper_private->wrappable<PutForwardsInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<PutForwardsInterface, V8cPutForwardsInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, PutForwardsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   { // Begin scope of scoped_refptr<ArbitraryInterface> forwarded_impl.
     scoped_refptr<ArbitraryInterface> forwarded_impl =
        impl->forwarding_attribute();
@@ -191,44 +156,42 @@
   }
 
   forwarded_impl->set_arbitrary_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
 }
     return;
   } // End scope of scoped_refptr<ArbitraryInterface> forwarded_impl.
+});
 }
 
 
 void staticForwardingAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<PutForwardsInterface,
+                                                    V8cPutForwardsInterface>(
+                    info,
+                    true,
+                    false,
+                    [](v8::Isolate* isolate, PutForwardsInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               PutForwardsInterface::static_forwarding_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void staticForwardingAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
+  script::v8c::shared_bindings::AttributeSetterImpl<PutForwardsInterface, V8cPutForwardsInterface>(info,
+                    true,
+                    false,
+                    [](v8::Isolate* isolate, PutForwardsInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   { // Begin scope of scoped_refptr<ArbitraryInterface> forwarded_impl.
     scoped_refptr<ArbitraryInterface> forwarded_impl =
        PutForwardsInterface::static_forwarding_attribute();
@@ -245,11 +208,12 @@
   }
 
   forwarded_impl->set_arbitrary_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
 }
     return;
   } // End scope of scoped_refptr<ArbitraryInterface> forwarded_impl.
+});
 }
 
 
@@ -308,79 +272,45 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "forwardingAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, forwardingAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, forwardingAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "forwardingAttribute"
+                  ,forwardingAttributeAttributeGetter
+                  ,forwardingAttributeAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "staticForwardingAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, staticForwardingAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, staticForwardingAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Operations installed on the interface object must be static methods, so
-    // no need to specify a signature, i.e. no need to do type check against a
-    // holder.
-
-    // If the attribute is a static attribute, then there is a single
-    // corresponding property and it exists on the interface's interface object.
-    function_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  true,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "staticForwardingAttribute"
+                  ,staticForwardingAttributeAttributeGetter
+                  ,staticForwardingAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_sequence_user.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_sequence_user.cc
index 6598389..798d426 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_sequence_user.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_sequence_user.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -127,31 +128,24 @@
 void getInterfaceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetInterfaceSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -163,31 +157,24 @@
 void getInterfaceSequenceSequenceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetInterfaceSequenceSequenceSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -199,31 +186,24 @@
 void getLongSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetLongSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -235,31 +215,24 @@
 void getStringSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetStringSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -271,31 +244,24 @@
 void getStringSequenceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetStringSequenceSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -307,31 +273,24 @@
 void getUnionOfStringAndStringSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetUnionOfStringAndStringSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -343,31 +302,24 @@
 void getUnionSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetUnionSequence(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -379,25 +331,18 @@
 void setInterfaceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -416,7 +361,7 @@
   }
 
   impl->SetInterfaceSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -425,25 +370,18 @@
 void setInterfaceSequenceSequenceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -462,7 +400,7 @@
   }
 
   impl->SetInterfaceSequenceSequenceSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -471,25 +409,18 @@
 void setLongSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -508,7 +439,7 @@
   }
 
   impl->SetLongSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -517,25 +448,18 @@
 void setStringSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -554,7 +478,7 @@
   }
 
   impl->SetStringSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -563,25 +487,18 @@
 void setStringSequenceSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -600,7 +517,7 @@
   }
 
   impl->SetStringSequenceSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -609,25 +526,18 @@
 void setUnionOfStringAndStringSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -646,7 +556,7 @@
   }
 
   impl->SetUnionOfStringAndStringSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -655,25 +565,18 @@
 void setUnionSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cSequenceUser::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cSequenceUser::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  SequenceUser* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             SequenceUser>(object);
+  if (!impl) {
     return;
   }
-  SequenceUser* impl =
-      wrapper_private->wrappable<SequenceUser>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -692,7 +595,7 @@
   }
 
   impl->SetUnionSequence(elements);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_static_properties_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_static_properties_interface.cc
index ed60f65..e92c7c4 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_static_properties_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_static_properties_interface.cc
@@ -52,6 +52,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -114,34 +115,31 @@
 
 void staticAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<StaticPropertiesInterface,
+                                                    V8cStaticPropertiesInterface>(
+                    info,
+                    true,
+                    false,
+                    [](v8::Isolate* isolate, StaticPropertiesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               StaticPropertiesInterface::static_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void staticAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
+  script::v8c::shared_bindings::AttributeSetterImpl<StaticPropertiesInterface, V8cStaticPropertiesInterface>(info,
+                    true,
+                    false,
+                    [](v8::Isolate* isolate, StaticPropertiesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -150,8 +148,9 @@
   }
 
   StaticPropertiesInterface::set_static_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -163,7 +162,7 @@
 
 
   StaticPropertiesInterface::StaticFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void staticFunctionStaticMethod2(
@@ -190,7 +189,7 @@
   }
 
   StaticPropertiesInterface::StaticFunction(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void staticFunctionStaticMethod3(
@@ -217,7 +216,7 @@
   }
 
   StaticPropertiesInterface::StaticFunction(arg);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void staticFunctionStaticMethod4(
@@ -264,7 +263,7 @@
   }
 
   StaticPropertiesInterface::StaticFunction(arg1, arg2, arg3);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 void staticFunctionStaticMethod5(
@@ -311,7 +310,7 @@
   }
 
   StaticPropertiesInterface::StaticFunction(arg1, arg2, arg3);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -333,9 +332,7 @@
       // Overload resolution algorithm details found here:
       //     http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
       v8::Local<v8::Value> arg = info[0];
-      V8cGlobalEnvironment* global_environment =
-          V8cGlobalEnvironment::GetFromIsolate(isolate);
-      WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
+      WrapperFactory* wrapper_factory = V8cGlobalEnvironment::GetFromIsolate(isolate)->wrapper_factory();
       v8::Local<v8::Object> object;
       if (arg->IsObject()) {
         object = arg->ToObject();
@@ -361,9 +358,7 @@
       // Overload resolution algorithm details found here:
       //     http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm
       v8::Local<v8::Value> arg = info[2];
-      V8cGlobalEnvironment* global_environment =
-          V8cGlobalEnvironment::GetFromIsolate(isolate);
-      WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
+      WrapperFactory* wrapper_factory = V8cGlobalEnvironment::GetFromIsolate(isolate)->wrapper_factory();
       v8::Local<v8::Object> object;
       if (arg->IsObject()) {
         object = arg->ToObject();
@@ -445,43 +440,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "staticAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, staticAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, staticAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Operations installed on the interface object must be static methods, so
-    // no need to specify a signature, i.e. no need to do type check against a
-    // holder.
-
-    // If the attribute is a static attribute, then there is a single
-    // corresponding property and it exists on the interface's interface object.
-    function_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  true,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "staticAttribute"
+                  ,staticAttributeAttributeGetter
+                  ,staticAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_anonymous_operation_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_anonymous_operation_interface.cc
index 7affa31..ead2354 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_anonymous_operation_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_anonymous_operation_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -109,40 +110,15 @@
 
 
 void Stringifier(const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  V8cExceptionState exception_state(isolate);
+  auto* impl = script::v8c::shared_bindings::get_impl_class_from_info<StringifierAnonymousOperationInterface, V8cStringifierAnonymousOperationInterface>(info);
 
-    V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierAnonymousOperationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-
-  // |WrapperPrivate::GetFromObject| can fail if |object| is not a |Wrapper|
-  // object.
-  if (!wrapper_private) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    return;
-  }
-
-  StringifierAnonymousOperationInterface* impl =
-      wrapper_private->wrappable<StringifierAnonymousOperationInterface>().get();
   if (!impl) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    NOTREACHED();
     return;
   }
   std::string stringified = impl->AnonymousStringifier();
 
   v8::Local<v8::Value> v8_stringified;
-  ToJSValue(isolate, stringified, &v8_stringified);
+  ToJSValue(info.GetIsolate(), stringified, &v8_stringified);
 
   info.GetReturnValue().Set(v8_stringified);
 }
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_attribute_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_attribute_interface.cc
index 58269d7..38eb8b3 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_attribute_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_attribute_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -110,67 +111,31 @@
 
 void theStringifierAttributeAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierAttributeInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  StringifierAttributeInterface* impl =
-      wrapper_private->wrappable<StringifierAttributeInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<StringifierAttributeInterface,
+                                                    V8cStringifierAttributeInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, StringifierAttributeInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->the_stringifier_attribute(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void theStringifierAttributeAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierAttributeInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  StringifierAttributeInterface* impl =
-      wrapper_private->wrappable<StringifierAttributeInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<StringifierAttributeInterface, V8cStringifierAttributeInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, StringifierAttributeInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -179,46 +144,22 @@
   }
 
   impl->set_the_stringifier_attribute(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void Stringifier(const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  V8cExceptionState exception_state(isolate);
+  auto* impl = script::v8c::shared_bindings::get_impl_class_from_info<StringifierAttributeInterface, V8cStringifierAttributeInterface>(info);
 
-    V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierAttributeInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-
-  // |WrapperPrivate::GetFromObject| can fail if |object| is not a |Wrapper|
-  // object.
-  if (!wrapper_private) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    return;
-  }
-
-  StringifierAttributeInterface* impl =
-      wrapper_private->wrappable<StringifierAttributeInterface>().get();
   if (!impl) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    NOTREACHED();
     return;
   }
   std::string stringified = impl->the_stringifier_attribute();
 
   v8::Local<v8::Value> v8_stringified;
-  ToJSValue(isolate, stringified, &v8_stringified);
+  ToJSValue(info.GetIsolate(), stringified, &v8_stringified);
 
   info.GetReturnValue().Set(v8_stringified);
 }
@@ -277,39 +218,24 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "theStringifierAttribute");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, theStringifierAttributeAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, theStringifierAttributeAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "theStringifierAttribute"
+                  ,theStringifierAttributeAttributeGetter
+                  ,theStringifierAttributeAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_operation_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_operation_interface.cc
index 043c675..71766c1 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_operation_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_stringifier_operation_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -112,31 +113,24 @@
 void theStringifierOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierOperationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cStringifierOperationInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  StringifierOperationInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             StringifierOperationInterface>(object);
+  if (!impl) {
     return;
   }
-  StringifierOperationInterface* impl =
-      wrapper_private->wrappable<StringifierOperationInterface>().get();
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->TheStringifierOperation(),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -145,40 +139,15 @@
 
 
 void Stringifier(const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  V8cExceptionState exception_state(isolate);
+  auto* impl = script::v8c::shared_bindings::get_impl_class_from_info<StringifierOperationInterface, V8cStringifierOperationInterface>(info);
 
-    V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cStringifierOperationInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-
-  // |WrapperPrivate::GetFromObject| can fail if |object| is not a |Wrapper|
-  // object.
-  if (!wrapper_private) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    return;
-  }
-
-  StringifierOperationInterface* impl =
-      wrapper_private->wrappable<StringifierOperationInterface>().get();
   if (!impl) {
-    exception_state.SetSimpleException(cobalt::script::kStringifierProblem);
-    NOTREACHED();
     return;
   }
   std::string stringified = impl->TheStringifierOperation();
 
   v8::Local<v8::Value> v8_stringified;
-  ToJSValue(isolate, stringified, &v8_stringified);
+  ToJSValue(info.GetIsolate(), stringified, &v8_stringified);
 
   info.GetReturnValue().Set(v8_stringified);
 }
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_target_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_target_interface.cc
index f1fa8a8..d98c088 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_target_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_target_interface.cc
@@ -50,6 +50,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -112,28 +113,21 @@
 void implementedInterfaceFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cTargetInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cTargetInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  TargetInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             TargetInterface>(object);
+  if (!impl) {
     return;
   }
-  TargetInterface* impl =
-      wrapper_private->wrappable<TargetInterface>().get();
 
   impl->ImplementedInterfaceFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -142,28 +136,21 @@
 void partialInterfaceFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cTargetInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cTargetInterface::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  TargetInterface* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             TargetInterface>(object);
+  if (!impl) {
     return;
   }
-  TargetInterface* impl =
-      wrapper_private->wrappable<TargetInterface>().get();
 
   impl->PartialInterfaceFunction();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_union_types_interface.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_union_types_interface.cc
index b1f1049..7ee0d0e 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_union_types_interface.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_union_types_interface.cc
@@ -54,6 +54,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -118,67 +119,31 @@
 
 void unionPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<UnionTypesInterface,
+                                                    V8cUnionTypesInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->union_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unionPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<UnionTypesInterface, V8cUnionTypesInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::UnionType4<std::string, bool, scoped_refptr<ArbitraryInterface>, int32_t > >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -187,74 +152,39 @@
   }
 
   impl->set_union_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unionWithNullableMemberPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<UnionTypesInterface,
+                                                    V8cUnionTypesInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->union_with_nullable_member_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unionWithNullableMemberPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<UnionTypesInterface, V8cUnionTypesInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<::cobalt::script::UnionType2<double, std::string > > >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -263,74 +193,39 @@
   }
 
   impl->set_union_with_nullable_member_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void nullableUnionPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<UnionTypesInterface,
+                                                    V8cUnionTypesInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->nullable_union_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void nullableUnionPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<UnionTypesInterface, V8cUnionTypesInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<base::Optional<::cobalt::script::UnionType2<double, std::string > > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -339,74 +234,39 @@
   }
 
   impl->set_nullable_union_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void unionBasePropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<UnionTypesInterface,
+                                                    V8cUnionTypesInterface>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->union_base_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void unionBasePropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cUnionTypesInterface::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  UnionTypesInterface* impl =
-      wrapper_private->wrappable<UnionTypesInterface>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<UnionTypesInterface, V8cUnionTypesInterface>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, UnionTypesInterface* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::UnionType2<scoped_refptr<BaseInterface>, std::string > >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -415,8 +275,9 @@
   }
 
   impl->set_union_base_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -475,147 +336,87 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unionProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unionPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unionPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unionProperty"
+                  ,unionPropertyAttributeGetter
+                  ,unionPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unionWithNullableMemberProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unionWithNullableMemberPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unionWithNullableMemberPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unionWithNullableMemberProperty"
+                  ,unionWithNullableMemberPropertyAttributeGetter
+                  ,unionWithNullableMemberPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "nullableUnionProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, nullableUnionPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, nullableUnionPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "nullableUnionProperty"
+                  ,nullableUnionPropertyAttributeGetter
+                  ,nullableUnionPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "unionBaseProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, unionBasePropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, unionBasePropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, the property exists solely on the interface's interface
-    // prototype object.
-    prototype_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  false,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "unionBaseProperty"
+                  ,unionBasePropertyAttributeGetter
+                  ,unionBasePropertyAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_window.cc b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_window.cc
index 3aef49e..e1fb14a 100644
--- a/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_window.cc
+++ b/src/cobalt/bindings/generated/v8c/testing/cobalt/bindings/testing/v8c_window.cc
@@ -152,6 +152,7 @@
 #include "cobalt/script/v8c/v8c_property_enumerator.h"
 #include "cobalt/script/v8c/v8c_value_handle.h"
 #include "cobalt/script/v8c/wrapper_private.h"
+#include "cobalt/script/v8c/common_v8c_bindings_code.h"
 #include "v8/include/v8.h"
 
 
@@ -322,67 +323,31 @@
 
 void windowPropertyAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<Window,
+                                                    V8cWindow>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, Window* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->window_property(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void windowPropertyAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<Window, V8cWindow>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, Window* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<std::string >::ConversionType value;
   FromJSValue(isolate, v8_value, kNoConversionFlags, &exception_state,
               &value);
@@ -391,114 +356,59 @@
   }
 
   impl->set_window_property(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
 void windowAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<Window,
+                                                    V8cWindow>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, Window* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->window(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 
 
 void onEventAttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
-
-
-  if (!exception_state.is_exception_set()) {
-    ToJSValue(isolate,
+  script::v8c::shared_bindings::AttributeGetterImpl<Window,
+                                                    V8cWindow>(
+                    info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, Window* impl,
+                       cobalt::script::ExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value) {
+  
+      ToJSValue(isolate,
               impl->on_event(),
               &result_value);
-  }
-  if (exception_state.is_exception_set()) {
-    return;
-  }
-  info.GetReturnValue().Set(result_value);
+
+  });
 }
 
 void onEventAttributeSetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  v8::Isolate* isolate = info.GetIsolate();
-  v8::Local<v8::Object> object = info.Holder();
-  v8::Local<v8::Value> v8_value = info[0];
-
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
-    return;
-  }
-  V8cExceptionState exception_state{isolate};
-  v8::Local<v8::Value> result_value;
-
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
-    return;
-  }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
+  script::v8c::shared_bindings::AttributeSetterImpl<Window, V8cWindow>(info,
+                    false,
+                    false,
+                    [](v8::Isolate* isolate, Window* impl,
+                       V8cExceptionState& exception_state,
+                       v8::Local<v8::Value>& result_value,
+                       v8::Local<v8::Value> v8_value) {
   TypeTraits<::cobalt::script::CallbackInterfaceTraits<SingleOperationInterface > >::ConversionType value;
   FromJSValue(isolate, v8_value, (kConversionFlagNullable), &exception_state,
               &value);
@@ -507,8 +417,9 @@
   }
 
   impl->set_on_event(value);
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
   return;
+});
 }
 
 
@@ -516,32 +427,25 @@
 void getStackTraceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cWindow::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  Window* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             Window>(object);
+  if (!impl) {
     return;
   }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
   V8cGlobalEnvironment* callwith_global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
 
   if (!exception_state.is_exception_set()) {
     ToJSValue(isolate,
               impl->GetStackTrace(callwith_global_environment->GetStackTrace()),
               &result_value);
-  }
+}
   if (!exception_state.is_exception_set()) {
     info.GetReturnValue().Set(result_value);
   }
@@ -553,25 +457,18 @@
 void setTimeoutMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cWindow::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  Window* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             Window>(object);
+  if (!impl) {
     return;
   }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
   const size_t kMinArguments = 1;
   if (info.Length() < kMinArguments) {
     exception_state.SetSimpleException(script::kInvalidNumberOfArguments);
@@ -593,11 +490,13 @@
   size_t num_set_arguments = 1;
   if (info.Length() > 1) {
     v8::Local<v8::Value> optional_value0 = info[1];
-    FromJSValue(isolate,
-                optional_value0,
-                kNoConversionFlags,
-                &exception_state,
-                &timeout);
+    {
+      FromJSValue(isolate,
+                  optional_value0,
+                  kNoConversionFlags,
+                  &exception_state,
+                  &timeout);
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -610,7 +509,7 @@
             ToJSValue(isolate,
                       impl->SetTimeout(handler),
                       &result_value);
-          }
+        }
           if (!exception_state.is_exception_set()) {
             info.GetReturnValue().Set(result_value);
           }
@@ -622,7 +521,7 @@
             ToJSValue(isolate,
                       impl->SetTimeout(handler, timeout),
                       &result_value);
-          }
+        }
           if (!exception_state.is_exception_set()) {
             info.GetReturnValue().Set(result_value);
           }
@@ -639,28 +538,21 @@
 void windowOperationMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
   v8::Isolate* isolate = info.GetIsolate();
   v8::Local<v8::Object> object = info.Holder();
-  V8cGlobalEnvironment* global_environment = V8cGlobalEnvironment::GetFromIsolate(isolate);
-  WrapperFactory* wrapper_factory = global_environment->wrapper_factory();
-  if (!WrapperPrivate::HasWrapperPrivate(object) ||
-      !V8cWindow::GetTemplate(isolate)->HasInstance(object)) {
-    V8cExceptionState exception(isolate);
-    exception.SetSimpleException(script::kDoesNotImplementInterface);
+  if (!script::v8c::shared_bindings::object_implements_interface(V8cWindow::GetTemplate(isolate), isolate, object)) {
     return;
   }
   V8cExceptionState exception_state{isolate};
   v8::Local<v8::Value> result_value;
 
-  WrapperPrivate* wrapper_private =
-      WrapperPrivate::GetFromWrapperObject(object);
-  if (!wrapper_private) {
-    NOTIMPLEMENTED();
+  Window* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             Window>(object);
+  if (!impl) {
     return;
   }
-  Window* impl =
-      wrapper_private->wrappable<Window>().get();
 
   impl->WindowOperation();
-  result_value = v8::Undefined(isolate);
+result_value = v8::Undefined(isolate);
 
 }
 
@@ -735,113 +627,65 @@
   // corresponding property. The characteristics of this property are as
   // follows:
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "windowProperty");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, windowPropertyAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, windowPropertyAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, if the attribute is unforgeable on the interface or if the
-    // interface was declared with the [Global] extended attribute, then the
-    // property exists on every object that implements the interface.
-    instance_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  true,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "windowProperty"
+                  ,windowPropertyAttributeGetter
+                  ,windowPropertyAttributeSetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "window");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, windowAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter;
-
-    // The location of the property is determined as follows:
-    // Otherwise, if the attribute is unforgeable on the interface or if the
-    // interface was declared with the [Global] extended attribute, then the
-    // property exists on every object that implements the interface.
-    instance_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  false,
+                  false,
+                  true,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "window"
+                  ,windowAttributeGetter
+                  );
 
   }
   {
-    // The name of the property is the identifier of the attribute.
-    v8::Local<v8::String> name = NewInternalString(
-        isolate,
-        "onEvent");
 
+    script::v8c::shared_bindings::set_property_for_nonconstructor_attribute(
+                  isolate,
     // The property has attributes { [[Get]]: G, [[Set]]: S, [[Enumerable]]:
     // true, [[Configurable]]: configurable }, where: configurable is false if
     // the attribute was declared with the [Unforgeable] extended attribute and
     // true otherwise;
-    bool configurable = true;
-    v8::PropertyAttribute attributes = static_cast<v8::PropertyAttribute>(
-        configurable ? v8::None : v8::DontDelete);
-
-    // G is the attribute getter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property;
-    // and
-    //
-    // S is the attribute setter created given the attribute, the interface, and
-    // the relevant Realm of the object that is the location of the property.
-    v8::Local<v8::FunctionTemplate> getter =
-        v8::FunctionTemplate::New(isolate, onEventAttributeGetter);
-    v8::Local<v8::FunctionTemplate> setter =
-        v8::FunctionTemplate::New(isolate, onEventAttributeSetter);
-
-    // The location of the property is determined as follows:
-    // Otherwise, if the attribute is unforgeable on the interface or if the
-    // interface was declared with the [Global] extended attribute, then the
-    // property exists on every object that implements the interface.
-    instance_template->
-        SetAccessorProperty(
-            name,
-            getter,
-            setter,
-            attributes);
+                  true,
+                  true,
+                  false,
+                  true,
+                  function_template,
+                  instance_template,
+                  prototype_template,
+                  "onEvent"
+                  ,onEventAttributeGetter
+                  ,onEventAttributeSetter
+                  );
 
   }
 
diff --git a/src/cobalt/bindings/mozjs45/templates/interface.cc.template b/src/cobalt/bindings/mozjs45/templates/interface.cc.template
index 1a26bab..03f736c 100644
--- a/src/cobalt/bindings/mozjs45/templates/interface.cc.template
+++ b/src/cobalt/bindings/mozjs45/templates/interface.cc.template
@@ -355,36 +355,8 @@
 }
 {% endif %}
 
-{% for constant in constants %}
-bool get_{{constant.idl_name}}(
-    JSContext* context, unsigned argc, JS::Value* vp) {
-{% if constant.can_use_compile_assert %}
-  COMPILE_ASSERT({{impl_class}}::{{constant.name}} == {{constant.value}},
-                 ValueFor{{impl_class}}_{{constant.name}}DoesNotMatchIDL);
-{% else %}
-  DCHECK_EQ({{constant.value}}, {{impl_class}}::{{constant.name}}) <<
-      "The value for {{impl_class}}::{{constant.name}} does not match "
-      "the value in the interface definition.";
-{% endif %}
-  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
-  if (!args.thisv().isObject()) {
-    MozjsExceptionState exception(context);
-    exception.SetSimpleException(script::kTypeError, "Invalid this.");
-    return false;
-  }
-  JS::RootedObject object(context, &args.thisv().toObject());
-  MozjsExceptionState exception_state(context);
-  JS::RootedValue result_value(context);
-  ToJSValue(context, {{constant.value}}, &result_value);
-  if (!exception_state.is_exception_set()) {
-    args.rval().set(result_value);
-  }
-  return !exception_state.is_exception_set();
-}
-{% endfor %}
-
 bool HasInstance(JSContext *context, JS::HandleObject type,
-                   JS::MutableHandleValue vp, bool *success) {
+                 JS::MutableHandleValue vp, bool *success) {
   JS::RootedObject global_object(
       context, JS_GetGlobalForObject(context, type));
   DCHECK(global_object);
@@ -534,6 +506,7 @@
 {%- for operation in operations + static_operations %}
 {% if operation.conditional %}
 #if defined({{operation.conditional}})
+
 {% endif %}
 {% set boundFunctionPrefix = "staticfcn_" if operation.is_static else "fcn_" %}
 {% for overload in operation.overloads if operation.overloads|length > 1 %}
@@ -552,13 +525,13 @@
       operation, boundFunctionPrefix + operation.idl_name) }}
 {% endif %}
 }
-
 {% if operation.conditional %}
+
 #endif  // {{operation.conditional}}
 {% endif %}
 {% endfor %}
-
 {% if stringifier %}
+
 bool Stringifier(JSContext* context, unsigned argc, JS::Value *vp) {
   MozjsExceptionState exception_state(context);
   // Compute the 'this' value.
@@ -603,15 +576,6 @@
 {% endif %}
 
 const JSPropertySpec prototype_properties[] = {
-{% for constant in constants %}
-  {
-      "{{constant.idl_name}}",
-      JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE,
-      { { &get_{{constant.idl_name}}, NULL } },
-      JSNATIVE_WRAPPER(NULL)
-  },
-{% endfor %}
-
 {% for attribute in attributes if not attribute.is_constructor_attribute %}
 {% if attribute.conditional %}
 #if defined({{attribute.conditional}})
@@ -657,15 +621,6 @@
 };
 
 const JSPropertySpec interface_object_properties[] = {
-{% for constant in constants %}
-  {
-    "{{constant.idl_name}}",
-    JSPROP_SHARED | JSPROP_ENUMERATE,
-    { { &get_{{constant.idl_name}}, NULL } },
-    JSNATIVE_WRAPPER(NULL),
-  },
-{% endfor %}
-
 {% for attribute in static_attributes %}
 {% if attribute.conditional %}
 #if defined({{attribute.conditional}})
@@ -811,11 +766,28 @@
       JSPROP_READONLY, NULL, NULL);
   DCHECK(success);
 {% endif %}
+{% if constants %}
 
-  // Define interface object properties (including constants).
+  // Define constants.
+{% for constant in constants %}
+  {
+    success = JS_DefineProperty(context, rooted_prototype,
+        "{{constant.idl_name}}", {{constant.value}},
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+    success = JS_DefineProperty(context, rooted_interface_object,
+        "{{constant.idl_name}}", {{constant.value}},
+        JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT, NULL, NULL);
+    DCHECK(success);
+  }
+{% endfor %}
+{% endif %}
+
+  // Define interface object properties (excluding constants).
   success = JS_DefineProperties(context, rooted_interface_object,
                                 interface_object_properties);
   DCHECK(success);
+
   // Define interface object functions (static).
   success = JS_DefineFunctions(context, rooted_interface_object,
                                interface_object_functions);
diff --git a/src/cobalt/bindings/mozjs45/templates/macros.cc.template b/src/cobalt/bindings/mozjs45/templates/macros.cc.template
index f804251..446b596 100644
--- a/src/cobalt/bindings/mozjs45/templates/macros.cc.template
+++ b/src/cobalt/bindings/mozjs45/templates/macros.cc.template
@@ -196,11 +196,17 @@
   if (args.length() > {{loop.index0 + non_optional_arguments|length}}) {
     JS::RootedValue optional_value{{loop.index0}}(
         context, args[{{loop.index0 + non_optional_arguments|length}}]);
-    FromJSValue(context,
-                optional_value{{loop.index0}},
-                {{argument.conversion_flags}},
-                &exception_state,
-                &{{argument.name}});
+{% if argument.default_value %}
+    if (!optional_value{{loop.index0}}.isUndefined()) {
+{% else %}
+    {
+{% endif %}
+      FromJSValue(context,
+                  optional_value{{loop.index0}},
+                  {{argument.conversion_flags}},
+                  &exception_state,
+                  &{{argument.name}});
+    }
     if (exception_state.is_exception_set()) {
       return false;
     }
diff --git a/src/cobalt/bindings/v8c/templates/interface.cc.template b/src/cobalt/bindings/v8c/templates/interface.cc.template
index c2c9da6..2b29c85 100644
--- a/src/cobalt/bindings/v8c/templates/interface.cc.template
+++ b/src/cobalt/bindings/v8c/templates/interface.cc.template
@@ -395,17 +395,18 @@
 {% else %}
 void {{attribute.idl_name}}AttributeGetter(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-
-  script::v8c::shared_bindings::AttributeGetterImpl<{{impl_class}}, {{binding_class}}>(info,
+  script::v8c::shared_bindings::AttributeGetterImpl<{{impl_class}},
+                                                    {{binding_class}}>(
+                    info,
                     {{ "true" if attribute.is_static else "false"}},
                     {{ "true" if attribute.type == "void" else "false"}},
                     [](v8::Isolate* isolate, {{impl_class}}* impl,
                        cobalt::script::ExceptionState& exception_state,
                        v8::Local<v8::Value>& result_value) {
-    {{ get_cobalt_value(impl_class, attribute.type,
-                        attribute.getter_function_name, [],
-                        attribute.raises_exception, attribute.call_with,
-                        attribute.is_static) }}
+{{ get_cobalt_value(impl_class, attribute.type,
+                    attribute.getter_function_name, [],
+                    attribute.raises_exception, attribute.call_with,
+                    attribute.is_static) }}
   });
 }
 
diff --git a/src/cobalt/bindings/v8c/templates/macros.cc.template b/src/cobalt/bindings/v8c/templates/macros.cc.template
index 9566390..67b53cf 100644
--- a/src/cobalt/bindings/v8c/templates/macros.cc.template
+++ b/src/cobalt/bindings/v8c/templates/macros.cc.template
@@ -162,11 +162,17 @@
 {% endif %}
   if (info.Length() > {{loop.index0 + non_optional_arguments|length}}) {
     v8::Local<v8::Value> optional_value{{loop.index0}} = info[{{loop.index0 + non_optional_arguments|length}}];
-    FromJSValue(isolate,
-                optional_value{{loop.index0}},
-                {{argument.conversion_flags}},
-                &exception_state,
-                &{{argument.name}});
+{% if argument.default_value %}
+    if (!optional_value{{loop.index0}}->IsUndefined()) {
+{% else %}
+    {
+{% endif %}
+      FromJSValue(isolate,
+                  optional_value{{loop.index0}},
+                  {{argument.conversion_flags}},
+                  &exception_state,
+                  &{{argument.name}});
+    }
     if (exception_state.is_exception_set()) {
       return;
     }
@@ -294,8 +300,7 @@
 {% macro call_nonvoid_function(return_type, function_name, arguments,
                                impl_class, is_static) %}
   if (!exception_state.is_exception_set()) {
-
-  {{call_nonvoid_function_internal(function_name, arguments,
+{{call_nonvoid_function_internal(function_name, arguments,
                                 impl_class, is_static) -}}
   }
 {%- endmacro %}
@@ -308,7 +313,9 @@
 {%- endmacro %}
 
 {% macro get_impl_class_instance(impl_class) %}
-  {{impl_class}}* impl = script::v8c::shared_bindings::get_impl_from_object<{{impl_class}}>(object);
+  {{impl_class}}* impl =
+          script::v8c::shared_bindings::get_impl_from_object<
+             {{impl_class}}>(object);
   if (!impl) {
     return;
   }
diff --git a/src/cobalt/browser/browser_bindings_gen.gyp b/src/cobalt/browser/browser_bindings_gen.gyp
index 4d50786..29cbc9d 100644
--- a/src/cobalt/browser/browser_bindings_gen.gyp
+++ b/src/cobalt/browser/browser_bindings_gen.gyp
@@ -47,6 +47,8 @@
         '../cssom/style_sheet.idl',
         '../cssom/style_sheet_list.idl',
 
+        '../dom/abort_controller.idl',
+        '../dom/abort_signal.idl',
         '../dom/animation_event.idl',
         '../dom/attr.idl',
         '../dom/audio_track.idl',
@@ -174,6 +176,7 @@
         '../h5vcc/h5vcc_runtime_event_target.idl',
         '../h5vcc/h5vcc_settings.idl',
         '../h5vcc/h5vcc_sso.idl',
+        '../h5vcc/h5vcc_storage.idl',
         '../h5vcc/h5vcc_system.idl',
         '../h5vcc/h5vcc_trace_event.idl',
 
diff --git a/src/cobalt/build/build.id b/src/cobalt/build/build.id
index 6e28320..9c8bf3a 100644
--- a/src/cobalt/build/build.id
+++ b/src/cobalt/build/build.id
@@ -1 +1 @@
-222164
\ No newline at end of file
+223237
\ No newline at end of file
diff --git a/src/cobalt/build/cobalt_configuration.py b/src/cobalt/build/cobalt_configuration.py
index eae97f9..ddb656e 100644
--- a/src/cobalt/build/cobalt_configuration.py
+++ b/src/cobalt/build/cobalt_configuration.py
@@ -136,6 +136,7 @@
         'layout_tests',
         'loader_test',
         'math_test',
+        'media_capture_test',
         'media_session_test',
         'media_stream_test',
         'memory_store_test',
diff --git a/src/cobalt/css_parser/grammar.y b/src/cobalt/css_parser/grammar.y
index 63f869d..798c4b6 100644
--- a/src/cobalt/css_parser/grammar.y
+++ b/src/cobalt/css_parser/grammar.y
@@ -5943,6 +5943,9 @@
     std::unique_ptr<FlexShorthand> flex(new FlexShorthand());
     flex->grow = new cssom::NumberValue($1);
     flex->shrink = new cssom::NumberValue($2);
+    // When omitted from the flex shorthand, flex-basis specified value is 0.
+    //  https://www.w3.org/TR/css-flexbox-1/#valdef-flex-flex-basis
+    flex->basis = new cssom::LengthValue(0, cssom::kPixelsUnit);
     $$ = flex.release();
   }
   | non_negative_number flex_basis_element {
diff --git a/src/cobalt/css_parser/parser_test.cc b/src/cobalt/css_parser/parser_test.cc
index fa1511c..fcdc5fb 100644
--- a/src/cobalt/css_parser/parser_test.cc
+++ b/src/cobalt/css_parser/parser_test.cc
@@ -5050,8 +5050,6 @@
   scoped_refptr<cssom::CSSDeclaredStyleData> style =
       parser_.ParseStyleDeclarationList("flex: 1 2;", source_location_);
 
-  // The keyword none expands to 0 0 auto.
-  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-none
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexGrowProperty));
   scoped_refptr<cssom::NumberValue> flex_grow =
       dynamic_cast<cssom::NumberValue*>(
@@ -5066,17 +5064,20 @@
   ASSERT_TRUE(flex_shrink);
   EXPECT_FLOAT_EQ(2, flex_shrink->value());
 
+  // When omitted from the flex shorthand, flex-basis specified value is 0.
+  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-flex-basis
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexBasisProperty));
-  EXPECT_EQ(cssom::KeywordValue::GetInitial(),
-            style->GetPropertyValue(cssom::kFlexBasisProperty));
+  scoped_refptr<cssom::LengthValue> flex_basis =
+      dynamic_cast<cssom::LengthValue*>(
+          style->GetPropertyValue(cssom::kFlexBasisProperty).get());
+  ASSERT_TRUE(flex_basis);
+  EXPECT_FLOAT_EQ(0, flex_basis->value());
 }
 
 TEST_F(ParserTest, ParsesFlexOneTwoZero) {
   scoped_refptr<cssom::CSSDeclaredStyleData> style =
       parser_.ParseStyleDeclarationList("flex: 1 2 0;", source_location_);
 
-  // The keyword none expands to 0 0 auto.
-  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-none
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexGrowProperty));
   scoped_refptr<cssom::NumberValue> flex_grow =
       dynamic_cast<cssom::NumberValue*>(
@@ -5103,8 +5104,6 @@
   scoped_refptr<cssom::CSSDeclaredStyleData> style =
       parser_.ParseStyleDeclarationList("flex: 0 100px;", source_location_);
 
-  // The keyword none expands to 0 0 auto.
-  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-none
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexGrowProperty));
   scoped_refptr<cssom::NumberValue> flex_grow =
       dynamic_cast<cssom::NumberValue*>(
@@ -5158,8 +5157,6 @@
   scoped_refptr<cssom::CSSDeclaredStyleData> style =
       parser_.ParseStyleDeclarationList("flex: 100px 0;", source_location_);
 
-  // The keyword none expands to 0 0 auto.
-  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-none
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexGrowProperty));
   scoped_refptr<cssom::NumberValue> flex_grow =
       dynamic_cast<cssom::NumberValue*>(
@@ -5184,8 +5181,6 @@
   scoped_refptr<cssom::CSSDeclaredStyleData> style =
       parser_.ParseStyleDeclarationList("flex: 100px 1 2;", source_location_);
 
-  // The keyword none expands to 0 0 auto.
-  //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-none
   ASSERT_TRUE(style->IsDeclared(cssom::kFlexGrowProperty));
   scoped_refptr<cssom::NumberValue> flex_grow =
       dynamic_cast<cssom::NumberValue*>(
diff --git a/src/cobalt/cssom/animation.h b/src/cobalt/cssom/animation.h
index 3d35a99..1880dae 100644
--- a/src/cobalt/cssom/animation.h
+++ b/src/cobalt/cssom/animation.h
@@ -31,10 +31,6 @@
 // animation references.
 class Animation {
  public:
-  // The enum IsCanceled is used as a flag to indicate if a removed animation
-  // is canceled or removed after finishing.
-  enum IsCanceled { kIsNotCanceled, kIsCanceled };
-
   // Determines how the animation should interact with the style before the
   // animation starts and after it ends.
   enum FillMode {
diff --git a/src/cobalt/cssom/animation_set.cc b/src/cobalt/cssom/animation_set.cc
index 9c1b426..751b72a 100644
--- a/src/cobalt/cssom/animation_set.cc
+++ b/src/cobalt/cssom/animation_set.cc
@@ -160,22 +160,21 @@
 
     // Create the animation and insert it into our map of currently active
     // animations.
-    InternalAnimationMap::iterator inserted =
-        animations_
-            .insert(std::make_pair(
-                name_string,
-                Animation(name_string, keyframes, current_time,
-                          GetTimeValue(i, style.animation_delay().get()),
-                          GetTimeValue(i, style.animation_duration().get()),
-                          GetFillMode(i, style.animation_fill_mode().get()),
-                          GetIterationCount(
-                              i, style.animation_iteration_count().get()),
-                          GetDirection(i, style.animation_direction().get()),
-                          GetTimingFunction(
-                              i, style.animation_timing_function().get()))))
-            .first;
+    InternalAnimationMap::iterator inserted = animations_.insert(
+        std::make_pair(
+            name_string,
+            AnimationEntry(Animation(name_string, keyframes, current_time,
+                GetTimeValue(i, style.animation_delay().get()),
+                GetTimeValue(i, style.animation_duration().get()),
+                GetFillMode(i, style.animation_fill_mode().get()),
+                GetIterationCount(
+                    i, style.animation_iteration_count().get()),
+                GetDirection(i, style.animation_direction().get()),
+                GetTimingFunction(
+                    i, style.animation_timing_function().get())))))
+        .first;
     if (event_handler_) {
-      event_handler_->OnAnimationStarted(inserted->second, this);
+      event_handler_->OnAnimationStarted(inserted->second.animation, this);
     }
 
     animations_modified = true;
@@ -185,28 +184,31 @@
   std::vector<std::string> animations_to_end;
   for (InternalAnimationMap::iterator iter = animations_.begin();
        iter != animations_.end(); ++iter) {
+    // If the animation is playing, but the current time is past the end time,
+    // then we should signal to the event handler that it has ended.
+    bool animation_has_ended =
+        current_time >= iter->second.animation.start_time() +
+                        iter->second.animation.duration();
+    if (animation_has_ended && !iter->second.ended) {
+      iter->second.ended = true;
+      if (event_handler_) {
+        event_handler_->OnAnimationEnded(iter->second.animation);
+      }
+    }
+
     // If the animation used to be playing, but it no longer appears in the
     // list of declared animations, then it has ended and we should mark it
     // as such.
     bool animation_is_removed = declared_animation_set.find(iter->first) ==
                                 declared_animation_set.end();
     if (animation_is_removed) {
+      if (event_handler_) {
+        event_handler_->OnAnimationRemoved(iter->second.animation);
+      }
       animations_to_end.push_back(iter->first);
     }
-
-    if (event_handler_) {
-      // If the animation is playing, but the current time is past the end time,
-      // then we should signal to the event handler that it has ended but is not
-      // canceled.
-      bool animation_has_ended =
-          current_time >= iter->second.start_time() + iter->second.duration();
-      if (animation_is_removed || animation_has_ended) {
-        event_handler_->OnAnimationRemoved(
-            iter->second, animation_has_ended ? cssom::Animation::kIsNotCanceled
-                                              : cssom::Animation::kIsCanceled);
-      }
-    }
   }
+
   if (!animations_to_end.empty()) {
     for (std::vector<std::string>::iterator iter = animations_to_end.begin();
          iter != animations_to_end.end(); ++iter) {
@@ -220,9 +222,10 @@
 }
 
 void AnimationSet::Clear() {
-  for (auto& animation : animations_) {
-    event_handler_->OnAnimationRemoved(animation.second,
-                                       cssom::Animation::kIsCanceled);
+  for (auto& iter : animations_) {
+    if (event_handler_) {
+      event_handler_->OnAnimationRemoved(iter.second.animation);
+    }
   }
   animations_.clear();
 }
diff --git a/src/cobalt/cssom/animation_set.h b/src/cobalt/cssom/animation_set.h
index ee5a005..081ab95 100644
--- a/src/cobalt/cssom/animation_set.h
+++ b/src/cobalt/cssom/animation_set.h
@@ -37,8 +37,8 @@
    public:
     virtual void OnAnimationStarted(const Animation& animation,
                                     AnimationSet* animation_set) = 0;
-    virtual void OnAnimationRemoved(const Animation& animation,
-                                    Animation::IsCanceled is_canceled) = 0;
+    virtual void OnAnimationEnded(const Animation& animation) = 0;
+    virtual void OnAnimationRemoved(const Animation& animation) = 0;
   };
 
   // Create an Animation with the specified EventHandler, whose methods will
@@ -62,7 +62,13 @@
  private:
   // Our internal collection of animations, mapping 'animation-name' to
   // a Animation object.
-  typedef std::map<std::string, Animation> InternalAnimationMap;
+  struct AnimationEntry {
+    explicit AnimationEntry(Animation&& in_animation)
+        : animation(std::move(in_animation)) {}
+    Animation animation;
+    bool ended = false;
+  };
+  typedef std::map<std::string, AnimationEntry> InternalAnimationMap;
 
   EventHandler* event_handler_;
   InternalAnimationMap animations_;
diff --git a/src/cobalt/dom/abort_controller.cc b/src/cobalt/dom/abort_controller.cc
new file mode 100644
index 0000000..546d5c4
--- /dev/null
+++ b/src/cobalt/dom/abort_controller.cc
@@ -0,0 +1,33 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "cobalt/dom/abort_controller.h"
+
+namespace cobalt {
+namespace dom {
+
+AbortController::AbortController() {
+  abort_signal_ = new AbortSignal();
+}
+
+void AbortController::Abort() {
+  abort_signal_->SignalAbort();
+}
+
+void AbortController::TraceMembers(script::Tracer* tracer) {
+  tracer->Trace(abort_signal_);
+}
+
+}  // namespace dom
+}  // namespace cobalt
diff --git a/src/cobalt/dom/abort_controller.h b/src/cobalt/dom/abort_controller.h
new file mode 100644
index 0000000..be273b0
--- /dev/null
+++ b/src/cobalt/dom/abort_controller.h
@@ -0,0 +1,46 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef COBALT_DOM_ABORT_CONTROLLER_H_
+#define COBALT_DOM_ABORT_CONTROLLER_H_
+
+#include "cobalt/dom/abort_signal.h"
+#include "cobalt/script/wrappable.h"
+
+namespace cobalt {
+namespace dom {
+
+// This represents the DOM AbortController object.
+//    https://dom.spec.whatwg.org/#interface-abortcontroller
+class AbortController : public script::Wrappable {
+ public:
+  // Web API: AbortController
+  AbortController();
+
+  const scoped_refptr<AbortSignal>& signal() const { return abort_signal_; }
+  void Abort();
+
+  DEFINE_WRAPPABLE_TYPE(AbortController);
+  void TraceMembers(script::Tracer* tracer) override;
+
+ private:
+  scoped_refptr<AbortSignal> abort_signal_;
+
+  DISALLOW_COPY_AND_ASSIGN(AbortController);
+};
+
+}  // namespace dom
+}  // namespace cobalt
+
+#endif  // COBALT_DOM_ABORT_CONTROLLER_H_
diff --git a/src/cobalt/dom/abort_controller.idl b/src/cobalt/dom/abort_controller.idl
new file mode 100644
index 0000000..7612f56
--- /dev/null
+++ b/src/cobalt/dom/abort_controller.idl
@@ -0,0 +1,21 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// https://dom.spec.whatwg.org/#interface-abortcontroller
+
+[Constructor]
+interface AbortController {
+  [SameObject] readonly attribute AbortSignal signal;
+  void abort();
+};
diff --git a/src/cobalt/dom/abort_signal.cc b/src/cobalt/dom/abort_signal.cc
new file mode 100644
index 0000000..f313df3
--- /dev/null
+++ b/src/cobalt/dom/abort_signal.cc
@@ -0,0 +1,72 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "cobalt/dom/abort_signal.h"
+
+#include "cobalt/dom/event.h"
+
+namespace cobalt {
+namespace dom {
+
+// https://dom.spec.whatwg.org/#abortsignal-follow
+void AbortSignal::Follow(const scoped_refptr<AbortSignal>& parent_signal) {
+  // 1. If followingSignal's aborted flag is set, then return.
+  if (aborted_) {
+    return;
+  }
+
+  if (!parent_signal) {
+    return;
+  }
+
+  // 2. If parentSignal's aborted flag is set, then signal abort on
+  //    followingSignal.
+  if (parent_signal->aborted()) {
+    SignalAbort();
+    return;
+  }
+
+  // 3. Otherwise, add the following abort steps to parentSignal:
+  //    a. Signal abort on followingSignal.
+  parent_signal->following_signals_.emplace_back(this);
+}
+
+// https://dom.spec.whatwg.org/#abortsignal-signal-abort
+void AbortSignal::SignalAbort() {
+  // 1. If signal's aborted flag is set, then return.
+  if (aborted_) {
+    return;
+  }
+
+  // 2. Set signal's aborted flag.
+  aborted_ = true;
+
+  // 3. For each algorithm in signal's abort algorithms: run algorithm.
+  for (auto& following_signal : following_signals_) {
+    following_signal->SignalAbort();
+  }
+
+  // 4. Empty signal's abort algorithms.
+  following_signals_.clear();
+
+  // 5. Fire an event named abort at signal.
+  DispatchEvent(new Event(base::Tokens::abort()));
+}
+
+void AbortSignal::TraceMembers(script::Tracer* tracer) {
+  tracer->TraceItems(following_signals_);
+}
+
+}  // namespace dom
+}  // namespace cobalt
diff --git a/src/cobalt/dom/abort_signal.h b/src/cobalt/dom/abort_signal.h
new file mode 100644
index 0000000..69db444
--- /dev/null
+++ b/src/cobalt/dom/abort_signal.h
@@ -0,0 +1,64 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef COBALT_DOM_ABORT_SIGNAL_H_
+#define COBALT_DOM_ABORT_SIGNAL_H_
+
+#include <vector>
+
+#include "cobalt/base/tokens.h"
+#include "cobalt/dom/event_target.h"
+
+namespace cobalt {
+namespace dom {
+
+// This represents the DOM AbortSignal object.
+//    https://dom.spec.whatwg.org/#interface-AbortSignal
+class AbortSignal : public EventTarget {
+ public:
+  AbortSignal() {}
+
+  // Web API: AbortSignal
+  bool aborted() const { return aborted_; }
+  const EventListenerScriptValue* onabort() const {
+    return GetAttributeEventListener(base::Tokens::abort());
+  }
+  void set_onabort(const EventListenerScriptValue& event_listener) {
+    SetAttributeEventListener(base::Tokens::abort(), event_listener);
+  }
+
+  // https://dom.spec.whatwg.org/#abortsignal-follow
+  void Follow(const scoped_refptr<AbortSignal>& parent_signal);
+
+  // Run the abort algorithms then trigger the abort event.
+  //   https://dom.spec.whatwg.org/#abortsignal-signal-abort
+  void SignalAbort();
+
+  DEFINE_WRAPPABLE_TYPE(AbortSignal);
+  void TraceMembers(script::Tracer* tracer) override;
+
+ private:
+  // Keep track of the signals following this abort signal. These will be
+  // traced to keep them alive and also signalled when this is signalled.
+  std::vector<scoped_refptr<AbortSignal>> following_signals_;
+
+  bool aborted_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(AbortSignal);
+};
+
+}  // namespace dom
+}  // namespace cobalt
+
+#endif  // COBALT_DOM_ABORT_SIGNAL_H_
diff --git a/src/cobalt/dom/abort_signal.idl b/src/cobalt/dom/abort_signal.idl
new file mode 100644
index 0000000..f11c1ea
--- /dev/null
+++ b/src/cobalt/dom/abort_signal.idl
@@ -0,0 +1,24 @@
+// Copyright 2019 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// https://dom.spec.whatwg.org/#interface-AbortSignal
+
+interface AbortSignal : EventTarget {
+  readonly attribute boolean aborted;
+  attribute EventHandler onabort;
+
+  // Non-standard exposure of "follow" API to facilitate polyfills.
+  // https://dom.spec.whatwg.org/#abortsignal-follow
+  void follow(AbortSignal parentSignal);
+};
diff --git a/src/cobalt/dom/css_animations_adapter.cc b/src/cobalt/dom/css_animations_adapter.cc
index 02b3cb3..c886de6 100644
--- a/src/cobalt/dom/css_animations_adapter.cc
+++ b/src/cobalt/dom/css_animations_adapter.cc
@@ -192,37 +192,38 @@
   web_animation->Play();
 }
 
+void CSSAnimationsAdapter::OnAnimationEnded(
+    const cssom::Animation& css_animation) {
+  // An animation has entered the "after phase", so we should correspondingly
+  // fire the animationend event.
+  //   https://drafts.csswg.org/date/2015-03-02/web-animations-css-integration/#css-animations-events
+  // Cobalt assumes that the CSSOM does not change during computed style
+  // calculation. Post to dispatch the event asynchronously here to avoid
+  // calling event handlers during computed style calculation, which in turn
+  // may modify CSSOM and require restart of the computed style calculation.
+  animatable_->GetEventTarget()->PostToDispatchEvent(
+      FROM_HERE,
+      new AnimationEvent(
+          base::Tokens::animationend(), css_animation.name(),
+          static_cast<float>(css_animation.duration().InMillisecondsF() *
+                             css_animation.iteration_count())));
+}
+
 void CSSAnimationsAdapter::OnAnimationRemoved(
-    const cssom::Animation& css_animation,
-    cssom::Animation::IsCanceled is_canceled) {
+    const cssom::Animation& css_animation) {
   // If a CSS Animation is removed from an element, its corresponding
   // Web Animations animation should be stopped and removed also.
   AnimationMap::iterator found = animation_map_.find(css_animation.name());
-  if (animation_map_.end() != found) {
-    if (is_canceled == cssom::Animation::kIsNotCanceled) {
-      // An animation has entered the "after phase", so we should
-      // correspondingly fire the animationend event.
-      //   https://drafts.csswg.org/date/2015-03-02/web-animations-css-integration/#css-animations-events
-      // Cobalt assumes that the CSSOM does not change during computed style
-      // calculation. Post to dispatch the event asynchronously here to avoid
-      // calling event handlers during computed style calculation, which in turn
-      // may modify CSSOM and require restart of the computed style calculation.
-      animatable_->GetEventTarget()->PostToDispatchEvent(
-          FROM_HERE,
-          new AnimationEvent(
-              base::Tokens::animationend(), css_animation.name(),
-              static_cast<float>(css_animation.duration().InMillisecondsF() *
-                                 css_animation.iteration_count())));
-    }
+  DCHECK(animation_map_.end() != found);
 
-    found->second->animation->Cancel();
-    delete found->second;
-    animation_map_.erase(found);
-  }
+  found->second->animation->Cancel();
+  delete found->second;
+  animation_map_.erase(found);
 }
 
 void CSSAnimationsAdapter::HandleAnimationEnterAfterPhase(
     cssom::AnimationSet* animation_set) {
+  // The update processing handles signalling when an animation ends.
   DCHECK(animatable_->GetDefaultTimeline()->current_time());
   base::TimeDelta current_time = base::TimeDelta::FromMillisecondsD(
       animatable_->GetDefaultTimeline()->current_time().value_or(0));
diff --git a/src/cobalt/dom/css_animations_adapter.h b/src/cobalt/dom/css_animations_adapter.h
index 6c0b7df..2574e4e 100644
--- a/src/cobalt/dom/css_animations_adapter.h
+++ b/src/cobalt/dom/css_animations_adapter.h
@@ -44,8 +44,8 @@
   // From cssom::AnimationSet::EventHandler.
   void OnAnimationStarted(const cssom::Animation& css_animation,
                           cssom::AnimationSet* animation_set) override;
-  void OnAnimationRemoved(const cssom::Animation& css_animation,
-                          cssom::Animation::IsCanceled is_canceled) override;
+  void OnAnimationEnded(const cssom::Animation& css_animation) override;
+  void OnAnimationRemoved(const cssom::Animation& css_animation) override;
 
  private:
   // The AnimationWithEventHandler struct maintains a reference to the Animation
diff --git a/src/cobalt/dom/dom.gyp b/src/cobalt/dom/dom.gyp
index 569d9eb..e4a81eb 100644
--- a/src/cobalt/dom/dom.gyp
+++ b/src/cobalt/dom/dom.gyp
@@ -23,6 +23,10 @@
       'target_name': 'dom',
       'type': 'static_library',
       'sources': [
+        'abort_controller.h',
+        'abort_controller.cc',
+        'abort_signal.h',
+        'abort_signal.cc',
         'animation_event.h',
         'animation_frame_request_callback_list.cc',
         'animation_frame_request_callback_list.h',
diff --git a/src/cobalt/dom/dom_exception.cc b/src/cobalt/dom/dom_exception.cc
index e1a8129..85cc3a7 100644
--- a/src/cobalt/dom/dom_exception.cc
+++ b/src/cobalt/dom/dom_exception.cc
@@ -17,45 +17,72 @@
 namespace cobalt {
 namespace dom {
 namespace {
+
+// https://heycam.github.io/webidl/#dfn-error-names-table
+const char* kCodeToErrorName[] = {
+  "",
+  "IndexSizeError",
+  "DOMStringSizeError",
+  "HierarchyRequestError",
+  "WrongDocumentError",
+  "InvalidCharacterError",
+  "NoDataAllowedError",
+  "NoModificationAllowedError",
+  "NotFoundError",
+  "NotSupportedError",
+  "InUseAttributeError",
+  "InvalidStateError",
+  "SyntaxError",
+  "InvalidModificationError",
+  "NamespaceError",
+  "InvalidAccessError",
+  "ValidationError",
+  "TypeMismatchError",
+  "SecurityError",
+  "NetworkError",
+  "AbortError",
+  "URLMismatchError",
+  "QuotaExceededError",
+  "TimeoutError",
+  "InvalidNodeTypeError",
+  "DataCloneError",
+};
+
 const char* GetErrorName(DOMException::ExceptionCode code) {
+  // Use the table for errors that have a corresponding code.
+  static_assert(arraysize(kCodeToErrorName) ==
+                DOMException::kHighestErrCodeValue + 1,
+                "Mismatch number of entries in error table");
+  if (code <= DOMException::kHighestErrCodeValue) {
+    return kCodeToErrorName[code];
+  }
+
   // Error names are enumerated here:
   //   http://heycam.github.io/webidl/#idl-DOMException-error-names
   switch (code) {
-    case DOMException::kNone:
-      return "";
-    case DOMException::kIndexSizeErr:
-      return "IndexSizeError";
-    case DOMException::kInvalidCharacterErr:
-      return "InvalidCharacterError";
-    case DOMException::kNoModificationAllowedErr:
-      return "NoModificationAllowedError";
-    case DOMException::kNotFoundErr:
-      return "NotFoundError";
-    case DOMException::kNotSupportedErr:
-      return "NotSupportedError";
-    case DOMException::kInvalidStateErr:
-      return "InvalidStateError";
-    case DOMException::kSyntaxErr:
-      return "SyntaxError";
-    case DOMException::kInvalidAccessErr:
-      return "InvalidAccessError";
-    case DOMException::kTypeMismatchErr:
-      return "TypeMismatchError";
-    case DOMException::kSecurityErr:
-      return "SecurityError";
-    case DOMException::kQuotaExceededErr:
-      return "QuotaExceededError";
     case DOMException::kReadOnlyErr:
       return "ReadOnlyError";
     case DOMException::kInvalidPointerIdErr:
       return "InvalidPointerId";
     case DOMException::kNotAllowedErr:
       return "NotAllowedError";
+    default:
+      NOTREACHED();
+      break;
   }
-  NOTREACHED();
+
   return "";
 }
 
+DOMException::ExceptionCode GetErrorCode(const std::string& name) {
+  for (size_t i = 0; i < arraysize(kCodeToErrorName); ++i) {
+    if (name == kCodeToErrorName[i]) {
+      return static_cast<DOMException::ExceptionCode>(i);
+    }
+  }
+  return DOMException::kNone;
+}
+
 // The code attribute's getter must return the legacy code indicated in the
 // error names table for this DOMException object's name, or 0 if no such entry
 // exists in the table.
@@ -75,6 +102,11 @@
       name_(GetErrorName(code)),
       message_(message) {}
 
+DOMException::DOMException(const std::string& message, const std::string& name)
+    : code_(GetErrorCode(name)),
+      name_(name),
+      message_(message) {}
+
 // static
 void DOMException::Raise(ExceptionCode code,
                          script::ExceptionState* exception_state) {
diff --git a/src/cobalt/dom/dom_exception.h b/src/cobalt/dom/dom_exception.h
index 16f9748..5651525 100644
--- a/src/cobalt/dom/dom_exception.h
+++ b/src/cobalt/dom/dom_exception.h
@@ -27,24 +27,45 @@
  public:
   // List of exceptions and codes found here:
   //   http://heycam.github.io/webidl/#idl-DOMException-error-names
-  // Add more codes as Cobalt needs them.
   enum ExceptionCode {
     // If the error name does not have a corresponding code, set the code to 0.
     kNone = 0,
-    kIndexSizeErr = 1,
-    kInvalidCharacterErr = 5,
-    kNoModificationAllowedErr = 7,
-    kNotFoundErr = 8,
-    kNotSupportedErr = 9,
-    kInvalidStateErr = 11,
-    kSyntaxErr = 12,
-    kInvalidAccessErr = 15,
+
+    // These errors have legacy code values (corresponding to the enum).
+    kIndexSizeErr,                // Deprecated. Use RangeError instead.
+    kDomstringSizeErr,            // Deprecated. Use RangeError instead.
+    kHierarchyRequestErr,
+    kWrongDocumentErr,
+    kInvalidCharacterErr,
+    kNoDataAllowedErr,            // Deprecated.
+    kNoModificationAllowedErr,
+    kNotFoundErr,
+    kNotSupportedErr,
+    kInuseAttributeErr,
+    kInvalidStateErr,
+    kSyntaxErr,
+    kInvalidModificationErr,
+    kNamespaceErr,
+    // kInvalidAccessErr is Deprecated. Use TypeError for invalid arguments,
+    // "NotSupportedError" DOMException for unsupported operations, and
+    // "NotAllowedError" DOMException for denied requests instead.
+    kInvalidAccessErr,
+    kValidationErr,               // Deprecated.
     // Note that TypeMismatchErr is replaced by TypeError but we keep using it
     // to be in sync with Chrome.
-    kTypeMismatchErr = 17,
-    kSecurityErr = 18,
-    kQuotaExceededErr = 22,
-    kHighestErrCodeValue = kQuotaExceededErr,
+    kTypeMismatchErr,
+    kSecurityErr,
+    kNetworkErr,
+    kAbortErr,
+    kUrlMismatchErr,
+    kQuotaExceededErr,
+    kTimeoutErr,
+    kInvalidNodeTypeErr,
+    kDataCloneErr,
+
+    kHighestErrCodeValue = kDataCloneErr,
+
+    // These errors have no legacy code values. They will use code kNone.
     kReadOnlyErr,
     kInvalidPointerIdErr,
     kNotAllowedErr
@@ -52,6 +73,7 @@
 
   explicit DOMException(ExceptionCode code);
   DOMException(ExceptionCode code, const std::string& message);
+  DOMException(const std::string& message, const std::string& name);
 
   uint16 code() const { return static_cast<uint16>(code_); }
   std::string name() const override { return name_; }
diff --git a/src/cobalt/dom/dom_exception.idl b/src/cobalt/dom/dom_exception.idl
index 2ec24f2..b277104 100644
--- a/src/cobalt/dom/dom_exception.idl
+++ b/src/cobalt/dom/dom_exception.idl
@@ -14,6 +14,8 @@
 
 // http://heycam.github.io/webidl/#idl-DOMException
 
+[Constructor(optional DOMString message = "",
+             optional DOMString name = "Error")]
 exception DOMException {
   readonly attribute unsigned short code;
   readonly attribute DOMString name;
@@ -22,10 +24,28 @@
   // List of exceptions and codes found here:
   //   http://heycam.github.io/webidl/#idl-DOMException-error-names
   const unsigned short INDEX_SIZE_ERR = 1;
+  const unsigned short DOMSTRING_SIZE_ERR = 2;
+  const unsigned short HIERARCHY_REQUEST_ERR = 3;
+  const unsigned short WRONG_DOCUMENT_ERR = 4;
+  const unsigned short INVALID_CHARACTER_ERR = 5;
+  const unsigned short NO_DATA_ALLOWED_ERR = 6;
+  const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
   const unsigned short NOT_FOUND_ERR = 8;
   const unsigned short NOT_SUPPORTED_ERR = 9;
+  const unsigned short INUSE_ATTRIBUTE_ERR = 10;
   const unsigned short INVALID_STATE_ERR = 11;
   const unsigned short SYNTAX_ERR = 12;
+  const unsigned short INVALID_MODIFICATION_ERR = 13;
+  const unsigned short NAMESPACE_ERR = 14;
   const unsigned short INVALID_ACCESS_ERR = 15;
+  const unsigned short VALIDATION_ERR = 16;
+  const unsigned short TYPE_MISMATCH_ERR = 17;
+  const unsigned short SECURITY_ERR = 18;
+  const unsigned short NETWORK_ERR = 19;
+  const unsigned short ABORT_ERR = 20;
+  const unsigned short URL_MISMATCH_ERR = 21;
   const unsigned short QUOTA_EXCEEDED_ERR = 22;
+  const unsigned short TIMEOUT_ERR = 23;
+  const unsigned short INVALID_NODE_TYPE_ERR = 24;
+  const unsigned short DATA_CLONE_ERR = 25;
 };
diff --git a/src/cobalt/fetch/embedded_scripts/fetch.js b/src/cobalt/fetch/embedded_scripts/fetch.js
index c32ecaf..ac5a7a3 100644
--- a/src/cobalt/fetch/embedded_scripts/fetch.js
+++ b/src/cobalt/fetch/embedded_scripts/fetch.js
@@ -1,24 +1,22 @@
-'use strict';(function(d){function I(a){"string"!==typeof a&&(a=String(a));if(/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(a))throw new g("Invalid character in header field name");return a.toLowerCase()}function V(a){"string"!==typeof a&&(a=String(a));var b;var c=0;for(b=a.length;c<b;c++){var e=a.charCodeAt(c);if(9!==e&&10!==e&&13!==e&&32!==e)break}for(b=a.length-1;b>c&&(e=a.charCodeAt(b),9===e||10===e||13===e||32===e);b--);a=a.substring(c,b+1);c=0;for(b=a.length;c<b;c++)if(e=a.charCodeAt(c),256<=e||0===e||
-10===e||13===e)throw new g("Invalid character in header field value");return a}function da(a,b){throw new g("Immutable header cannot be modified");}function ea(a,b){return!1}function fa(a,b){a=a.toLowerCase();return-1<ha.indexOf(a)||a.startsWith("proxy-")||a.startsWith("sec-")?!0:!1}function ia(a,b){a=a.toLowerCase();return-1<ja.indexOf(a)||"content-type"===a&&(b=b.split(";")[0].toLowerCase(),-1<ka.indexOf(b))?!1:!0}function R(a,b){return-1<la.indexOf(a.toLowerCase())?!0:!1}function h(a){this[k]=
-new O;void 0===this[z]&&(this[z]=ea);if(void 0!==a){if(null===a||"object"!==typeof a)throw new g("Constructing Headers with invalid parameters");a instanceof h?a.forEach(function(a,c){this.append(c,a)},this):J.isArray(a)?a.forEach(function(a){if(2!==a.length)throw new g("Constructing Headers with invalid parameters");this.append(a[0],a[1])},this):Object.getOwnPropertyNames(a).forEach(function(b){this.append(b,a[b])},this)}}function K(a,b){var c=ma(h.prototype);c[z]=b;h.call(c,a);return c}function S(a){if(a.bodyUsed)return t.reject(new g("Body was already read"));
-if(null===a.body)return t.resolve(new y(0));if(na(a.body))return t.reject(new g("ReadableStream was already locked"));var b=a.body.getReader(),c=[],e=0;return b.read().then(function oa(a){if(a.done){if(0===c.length)a=new y(0);else if(1===c.length)a=new y(c[0].buffer);else{a=new y(e);for(var d=0,f=c.length,h=0;d<f;d++)a.set(c[d],h),h+=c[d].length}return a}return a.value instanceof y?(e+=a.value.length,c.push(a.value),b.read().then(oa)):t.reject(new g("Invalid stream data type"))})}function W(){this._initBody=
-function(a){this[T]=!1;this[n]=null===a||void 0===a?null:a instanceof U?a:new U({start:function(b){if(a)if("string"===typeof a)b.enqueue(FetchInternal.encodeToUTF8(a));else if(X.prototype.isPrototypeOf(a))b.enqueue(new y(a.slice(0)));else if(pa(a))b.enqueue(new y(a.buffer.slice(0)));else if(a instanceof Blob)b.enqueue(new y(FetchInternal.blobToArrayBuffer(a)));else throw new g("Unsupported BodyInit type");b.close()}});this[q].get("content-type")||("string"===typeof a?this[q].set("content-type","text/plain;charset=UTF-8"):
-a instanceof Blob&&""!==a.type&&this[q].set("content-type",a.type))};L(this,{body:{get:function(){return this[n]}},bodyUsed:{get:function(){return this[T]?!0:this[n]?!!qa(this[n]):!1}}});this.arrayBuffer=function(){return this[D]?t.reject(new w):S(this).then(function(a){return a.buffer})};this.text=function(){return this[D]?t.reject(new w):S(this).then(function(a){return FetchInternal.decodeFromUTF8(a)})};this.json=function(){return this[D]?t.reject(new w):this.text().then(JSON.parse)};return this}
-function m(a){var b=this;this[E]=null;a instanceof m?(this[E]=a.onabort,this[M]=a[M],this[r]=a[r]):(this[M]={is_aborted:!1},this[r]={});L(this,{aborted:{get:function(){return b[M].is_aborted}},onabort:{get:function(){return b[E]},set:function(a){return b[E]=a}}})}function A(a,b){var c=void 0!==b&&null!==b&&void 0===b.cloneBody;b=b||{};var e=b.body||b.cloneBody,d=b.headers;if(a instanceof A)this[B]=a.url,this[F]=a.cache,this[G]=a.credentials,void 0===d&&(d=a.headers),this[H]=a.integrity,this[C]=a.method,
-this[p]=a.mode,c&&"navigate"===this[p]&&(this[p]="same-origin"),this[N]=a.redirect,e||null===a.body||(e=a.body,a[T]=!0),this[u]="signal"in b&&null==b.signal?new m:"signal"in b?b.signal:a[u];else{this[B]=String(a);if(!FetchInternal.isUrlValid(this[B],!1))throw new g("Invalid request URL");this[p]="cors";this[G]="same-origin";this[u]=b.signal&&null!=b.signal?new m(b.signal):new m}if(void 0!==b.window&&null!==b.window)throw new g("Invalid request window");this[F]=b.cache||this[F]||"default";if(-1===
-ra.indexOf(this[F]))throw new g("Invalid request cache mode");this[G]=b.credentials||this[G]||"same-origin";if(-1===sa.indexOf(this[G]))throw new g("Invalid request credentials");void 0!==b.integrity?this[H]=b.integrity:void 0===this[H]&&(this[H]="");a=(b.method||this[C]||"GET").toUpperCase();if(-1===ta.indexOf(a))throw new g("Invalid request method");this[C]=a;if(b.mode&&-1===ua.indexOf(b.mode))throw new g("Invalid request mode");this[p]=b.mode||this[p]||"no-cors";if("no-cors"===this[p]){if(-1===
-va.indexOf(this[C]))throw new g("Invalid request method for no-cors");if(""!==this[H])throw new g("Request integrity data is not allowed with no-cors");}if("same-origin"!==this[p]&&"only-if-cached"===this[F])throw new g("Request mode must be same-origin for only-if-cached");this[N]=b.redirect||this[N]||"follow";if(-1===wa.indexOf(this[N]))throw new g("Invalid request redirect mode");this[q]="no-cors"===this[p]?K(d,ia):K(d,fa);if(("GET"===this[C]||"HEAD"===this[C])&&e)throw new g("Request body is not allowed for GET or HEAD");
-this._initBody(e)}function xa(a,b){var c=K(void 0,b);a.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(a){var b=a.split(":");if(a=b.shift().trim())b=b.join(":").trim(),c.append(a,b)});return c}function v(a,b){b||(b={});this[P]="default";this[x]="status"in b?b.status:200;if(200>this[x]||599<this[x])throw new Y("Invalid response status");this[Z]=200<=this[x]&&300>this[x];if("statusText"in b){var c=b.statusText;for(var e=0,d=c.length,f;e<d;e++)if(f=c.charCodeAt(e),9!==f&&(32>f||255<f||127===
-f))throw g("Invalid response status text");}else c="OK";this[Q]=c;this[q]=K(b.headers,R);this[B]=b.url||"";if(a&&-1<ya.indexOf(this[x]))throw new g("Response body is not allowed with a null body status");this[D]=b.is_aborted||!1;this._initBody(a)}function aa(){ba(this,"signal",{value:new m,writable:!1})}if(!d.fetch){var J=d.Array,X=d.ArrayBuffer,ma=d.Object.create,L=d.Object.defineProperties,ba=d.Object.defineProperty,f=d.Symbol,za=f.iterator,O=d.Map,Y=d.RangeError,g=d.TypeError,y=d.Uint8Array,t=
-d.Promise,U=d.ReadableStream,ca=d.ReadableStreamTee,qa=d.IsReadableStreamDisturbed,na=d.IsReadableStreamLocked,n=f("body"),T=f("bodyUsed"),F=f("cache"),G=f("credentials"),z=f("guardCallback"),q=f("headers"),H=f("integrity"),k=f("map"),C=f("method"),p=f("mode"),Z=f("ok"),N=f("redirect"),x=f("status"),Q=f("statusText"),P=f("type"),B=f("url"),D=f("is_aborted"),u=f("signal"),E=f("onabort"),M=f("abort_hash"),r=f("listeners"),ha="accept-charset accept-encoding access-control-request-headers access-control-request-method connection content-length cookie cookie2 date dnt expect host keep-alive origin referer te trailer transfer-encoding upgrade via".split(" "),
-la=["set-cookie","set-cookie2"],ja=["accept","accept-language","content-language"],ka=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],ra="default no-store reload no-cache force-cache only-if-cached".split(" "),sa=["omit","same-origin","include"],ta="DELETE GET HEAD OPTIONS POST PUT".split(" "),va=["GET","HEAD","POST"],ua=["same-origin","no-cors","cors"],wa=["follow","error","manual"],ya=[101,204,205,304],Aa=[301,302,303,307,308],Ba="[object Int8Array];[object Uint8Array];[object Uint8ClampedArray];[object Int16Array];[object Uint16Array];[object Int32Array];[object Uint32Array];[object Float32Array];[object Float64Array]".split(";"),
-pa=X.isView||function(a){return a&&-1<Ba.indexOf(Object.prototype.toString.call(a))},w=function(){L(this,{message:{value:"Aborted",writable:!1},name:{value:"AbortError",writable:!1},code:{value:20,writable:!1}})};w.prototype.constructor=w;h.prototype.append=function(a,b){if(2!==arguments.length)throw g("Invalid parameters to append");a=I(a);b=V(b);this[z](a,b)||(this[k].has(a)?this[k].set(a,this[k].get(a)+", "+b):this[k].set(a,b))};h.prototype["delete"]=function(a){if(1!==arguments.length)throw g("Invalid parameters to delete");
-this[z](a,"invalid")||this[k].delete(I(a))};h.prototype.get=function(a){if(1!==arguments.length)throw g("Invalid parameters to get");a=I(a);var b=this[k].get(a);return void 0!==b?b:null};h.prototype.has=function(a){if(1!==arguments.length)throw g("Invalid parameters to has");return this[k].has(I(a))};h.prototype.set=function(a,b){if(2!==arguments.length)throw g("Invalid parameters to set");a=I(a);b=V(b);this[z](a,b)||this[k].set(a,b)};h.prototype.forEach=function(a,b){var c=this;J.from(this[k].entries()).sort().forEach(function(e){a.call(b,
-e[1],e[0],c)})};h.prototype.keys=function(){return(new O(J.from(this[k].entries()).sort())).keys()};h.prototype.values=function(){return(new O(J.from(this[k].entries()).sort())).values()};h.prototype.entries=function(){return(new O(J.from(this[k].entries()).sort())).entries()};h.prototype[za]=h.prototype.entries;m.prototype.constructor=m;m.prototype.dispatchEvent=function(a){"abort"===a.type&&(this[M].is_aborted=!0,"function"===typeof this[E]&&this[E].call(this,a));if(a.type in this[r]){for(var b=
-this[r][a.type],c=b.length-1;0<=c;c--)b[c].call(this,a);return!a.defaultPrevented}};m.prototype.addEventListener=function(a,b){a in this[r]||(this[r][a]=[]);this[r][a].push(b)};m.prototype.removeEventListener=function(a,b){if(a in this[r]){a=this[r][type];for(var c=0,e=a.length;c<e;c++)if(a[c]===b){a.splice(c,1);break}}};m.prototype.clone=function(){return new m(this)};d.AbortSignal=m;A.prototype.clone=function(){var a=null;null!==this[n]&&(a=ca(this[n],!0),this[n]=a[0],a=a[1]);return new A(this,
-{cloneBody:a,signal:this[u].clone()})};L(A.prototype,{cache:{get:function(){return this[F]}},credentials:{get:function(){return this[G]}},headers:{get:function(){return this[q]}},integrity:{get:function(){return this[H]}},method:{get:function(){return this[C]}},mode:{get:function(){return this[p]}},redirect:{get:function(){return this[N]}},url:{get:function(){return this[B]}},signal:{get:function(){return this[u]}}});W.call(A.prototype);W.call(v.prototype);v.prototype.clone=function(){var a=null;
-null!==this[n]&&(a=ca(this[n],!0),this[n]=a[0],a=a[1]);return new v(a,{status:this[x],statusText:this[Q],headers:K(this[q],R),url:this[B],is_aborted:this[D]})};L(v.prototype,{headers:{get:function(){return this[q]}},ok:{get:function(){return this[Z]}},status:{get:function(){return this[x]}},statusText:{get:function(){return this[Q]}},type:{get:function(){return this[P]}},url:{get:function(){return this[B]}}});v.error=function(){var a=new v(null);a[q][z]=da;a[P]="error";a[x]=0;a[Q]="";return a};v.redirect=
-function(a,b){if(!FetchInternal.isUrlValid(a,!0))throw new g("Invalid URL for response redirect");void 0===b&&(b=302);if(-1===Aa.indexOf(b))throw new Y("Invalid status code for response redirect");return new v(null,{status:b,headers:{location:a}})};d.Headers=h;d.Request=A;d.Response=v;d.fetch=function(a,b){return new t(function(c,e){var d=!1,f=!1,h=new A(a,b),l=new XMLHttpRequest,k=null;if(h.signal.aborted)return e(new w);var m=new U({start:function(a){k=a},cancel:function(a){d=!0;l.abort()}}),n=
-function(){if(!d){d=!0;m.cancel();if(k)try{k.close()}catch(Ca){}setTimeout(function(){try{l.abort()}catch(Ca){}},0)}},r=m.getReader;m.getReader=function(){var a=r.bind(this).call(),b=a.read,c=a.closed;a.read=function(){return h[u]&&h[u].aborted?(n(),t.reject(new w)):b.bind(this).call()};ba(a,"closed",{get:function(){return h[u]&&h[u].aborted?(n(),t.reject(new w)):c}});return a};l.onload=function(){k.close()};l.onreadystatechange=function(){if(l.readyState===l.HEADERS_RECEIVED){var a={status:l.status,
-statusText:l.statusText,headers:xa(l.getAllResponseHeaders()||"",R)};a.url="responseURL"in l?l.responseURL:a.headers.get("X-Request-URL");try{var b=new v(m,a);h[u].addEventListener("abort",function(){b[D]=!0;n();e(new w)});b[P]=f?"cors":"basic";c(b)}catch(Da){e(Da)}}};l.onerror=function(){k.error(new g("Network request failed"));e(new g("Network request failed"))};l.ontimeout=function(){k.error(new g("Network request failed"));e(new g("Network request failed"))};l.open(h.method,h.url,!0);"include"===
-h.credentials&&(l.withCredentials=!0);h.headers.forEach(function(a,b){l.setRequestHeader(b,a)});var p=function(a){d||k.enqueue(a)},q=function(a){f=a};null===h.body?l.fetch(p,q,null):S(h).then(function(a){l.fetch(p,q,a)})})};aa.prototype.abort=function(){this.signal.dispatchEvent(new Event("abort"))};d.AbortController=aa;d.fetch.polyfill=!0}})(this);
\ No newline at end of file
+'use strict';(function(c){function E(a){"string"!==typeof a&&(a=String(a));if(/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(a))throw new g("Invalid character in header field name");return a.toLowerCase()}function Q(a){"string"!==typeof a&&(a=String(a));var b;var d=0;for(b=a.length;d<b;d++){var e=a.charCodeAt(d);if(9!==e&&10!==e&&13!==e&&32!==e)break}for(b=a.length-1;b>d&&(e=a.charCodeAt(b),9===e||10===e||13===e||32===e);b--);a=a.substring(d,b+1);d=0;for(b=a.length;d<b;d++)if(e=a.charCodeAt(d),256<=e||0===e||
+10===e||13===e)throw new g("Invalid character in header field value");return a}function W(a,b){throw new g("Immutable header cannot be modified");}function X(a,b){return!1}function Y(a,b){a=a.toLowerCase();return-1<Z.indexOf(a)||a.startsWith("proxy-")||a.startsWith("sec-")?!0:!1}function aa(a,b){a=a.toLowerCase();return-1<ba.indexOf(a)||"content-type"===a&&(b=b.split(";")[0].toLowerCase(),-1<ca.indexOf(b))?!1:!0}function L(a,b){return-1<da.indexOf(a.toLowerCase())?!0:!1}function h(a){this[l]=new I;
+void 0===this[v]&&(this[v]=X);if(void 0!==a){if(null===a||"object"!==typeof a)throw new g("Constructing Headers with invalid parameters");a instanceof h?a.forEach(function(a,d){this.append(d,a)},this):F.isArray(a)?a.forEach(function(a){if(2!==a.length)throw new g("Constructing Headers with invalid parameters");this.append(a[0],a[1])},this):Object.getOwnPropertyNames(a).forEach(function(b){this.append(b,a[b])},this)}}function G(a,b){var d=ea(h.prototype);d[v]=b;h.call(d,a);return d}function M(a){if(a.bodyUsed)return t.reject(new g("Body was already read"));
+if(null===a.body)return t.resolve(new u(0));if(fa(a.body))return t.reject(new g("ReadableStream was already locked"));var b=a.body.getReader(),d=[],e=0;return b.read().then(function ha(a){if(a.done){if(0===d.length)a=new u(0);else if(1===d.length)a=new u(d[0].buffer);else{a=new u(e);for(var k=0,c=d.length,f=0;k<c;k++)a.set(d[k],f),f+=d[k].length}return a}return a.value instanceof u?(e+=a.value.length,d.push(a.value),b.read().then(ha)):t.reject(new g("Invalid stream data type"))})}function R(){this._initBody=
+function(a){this[N]=!1;this[m]=null===a||void 0===a?null:a instanceof O?a:new O({start:function(b){if(a)if("string"===typeof a)b.enqueue(FetchInternal.encodeToUTF8(a));else if(S.prototype.isPrototypeOf(a))b.enqueue(new u(a.slice(0)));else if(ia(a))b.enqueue(new u(a.buffer.slice(0)));else if(a instanceof Blob)b.enqueue(new u(FetchInternal.blobToArrayBuffer(a)));else throw new g("Unsupported BodyInit type");b.close()}});this[n].get("content-type")||("string"===typeof a?this[n].set("content-type","text/plain;charset=UTF-8"):
+a instanceof Blob&&""!==a.type&&this[n].set("content-type",a.type))};P(this,{body:{get:function(){return this[m]}},bodyUsed:{get:function(){return this[N]?!0:this[m]?!!ja(this[m]):!1}}});this.arrayBuffer=function(){return this[z]?t.reject(new DOMException("Aborted","AbortError")):M(this).then(function(a){return a.buffer})};this.text=function(){return this[z]?t.reject(new DOMException("Aborted","AbortError")):M(this).then(function(a){return FetchInternal.decodeFromUTF8(a)})};this.json=function(){return this[z]?
+t.reject(new DOMException("Aborted","AbortError")):this.text().then(JSON.parse)};return this}function w(a,b){var d=void 0!==b&&null!==b&&void 0===b.cloneBody;b=b||{};var e=b.body||b.cloneBody,c=b.headers,f=new AbortController;this[A]=f.signal;f=null;if(a instanceof w)this[x]=a.url,this[B]=a.cache,this[C]=a.credentials,void 0===c&&(c=a.headers),this[D]=a.integrity,this[y]=a.method,this[p]=a.mode,d&&"navigate"===this[p]&&(this[p]="same-origin"),this[H]=a.redirect,e||null===a.body||(e=a.body,a[N]=!0),
+f=a[A];else{this[x]=String(a);if(!FetchInternal.isUrlValid(this[x],!1))throw new g("Invalid request URL");this[p]="cors";this[C]="same-origin"}if(void 0!==b.window&&null!==b.window)throw new g("Invalid request window");this[B]=b.cache||this[B]||"default";if(-1===ka.indexOf(this[B]))throw new g("Invalid request cache mode");this[C]=b.credentials||this[C]||"same-origin";if(-1===la.indexOf(this[C]))throw new g("Invalid request credentials");void 0!==b.integrity?this[D]=b.integrity:void 0===this[D]&&
+(this[D]="");a=(b.method||this[y]||"GET").toUpperCase();if(-1===ma.indexOf(a))throw new g("Invalid request method");this[y]=a;if(b.mode&&-1===na.indexOf(b.mode))throw new g("Invalid request mode");this[p]=b.mode||this[p]||"no-cors";if("no-cors"===this[p]){if(-1===oa.indexOf(this[y]))throw new g("Invalid request method for no-cors");if(""!==this[D])throw new g("Request integrity data is not allowed with no-cors");}if("same-origin"!==this[p]&&"only-if-cached"===this[B])throw new g("Request mode must be same-origin for only-if-cached");
+this[H]=b.redirect||this[H]||"follow";if(-1===pa.indexOf(this[H]))throw new g("Invalid request redirect mode");this[n]="no-cors"===this[p]?G(c,aa):G(c,Y);if(("GET"===this[y]||"HEAD"===this[y])&&e)throw new g("Request body is not allowed for GET or HEAD");"signal"in b&&(f=b.signal);f&&this[A].follow(f);this._initBody(e)}function qa(a,b){var d=G(void 0,b);a.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(a){var b=a.split(":");if(a=b.shift().trim())b=b.join(":").trim(),d.append(a,b)});return d}
+function r(a,b){b||(b={});this[J]="default";this[q]="status"in b?b.status:200;if(200>this[q]||599<this[q])throw new T("Invalid response status");this[U]=200<=this[q]&&300>this[q];if("statusText"in b){var d=b.statusText;for(var e=0,f=d.length,c;e<f;e++)if(c=d.charCodeAt(e),9!==c&&(32>c||255<c||127===c))throw g("Invalid response status text");}else d="OK";this[K]=d;this[n]=G(b.headers,L);this[x]=b.url||"";if(a&&-1<ra.indexOf(this[q]))throw new g("Response body is not allowed with a null body status");
+this[z]=b.is_aborted||!1;this._initBody(a)}if(!c.fetch){var F=c.Array,S=c.ArrayBuffer,ea=c.Object.create,P=c.Object.defineProperties,f=c.Symbol,sa=f.iterator,I=c.Map,T=c.RangeError,g=c.TypeError,u=c.Uint8Array,t=c.Promise,O=c.ReadableStream,V=c.ReadableStreamTee,ja=c.IsReadableStreamDisturbed,fa=c.IsReadableStreamLocked,m=f("body"),N=f("bodyUsed"),B=f("cache"),C=f("credentials"),v=f("guardCallback"),n=f("headers"),D=f("integrity"),l=f("map"),y=f("method"),p=f("mode"),U=f("ok"),H=f("redirect"),q=f("status"),
+K=f("statusText"),J=f("type"),x=f("url"),z=f("is_aborted"),A=f("signal"),Z="accept-charset accept-encoding access-control-request-headers access-control-request-method connection content-length cookie cookie2 date dnt expect host keep-alive origin referer te trailer transfer-encoding upgrade via".split(" "),da=["set-cookie","set-cookie2"],ba=["accept","accept-language","content-language"],ca=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],ka="default no-store reload no-cache force-cache only-if-cached".split(" "),
+la=["omit","same-origin","include"],ma="DELETE GET HEAD OPTIONS POST PUT".split(" "),oa=["GET","HEAD","POST"],na=["same-origin","no-cors","cors"],pa=["follow","error","manual"],ra=[101,204,205,304],ta=[301,302,303,307,308],ua="[object Int8Array];[object Uint8Array];[object Uint8ClampedArray];[object Int16Array];[object Uint16Array];[object Int32Array];[object Uint32Array];[object Float32Array];[object Float64Array]".split(";"),ia=S.isView||function(a){return a&&-1<ua.indexOf(Object.prototype.toString.call(a))};
+h.prototype.append=function(a,b){if(2!==arguments.length)throw g("Invalid parameters to append");a=E(a);b=Q(b);this[v](a,b)||(this[l].has(a)?this[l].set(a,this[l].get(a)+", "+b):this[l].set(a,b))};h.prototype["delete"]=function(a){if(1!==arguments.length)throw g("Invalid parameters to delete");this[v](a,"invalid")||this[l].delete(E(a))};h.prototype.get=function(a){if(1!==arguments.length)throw g("Invalid parameters to get");a=E(a);var b=this[l].get(a);return void 0!==b?b:null};h.prototype.has=function(a){if(1!==
+arguments.length)throw g("Invalid parameters to has");return this[l].has(E(a))};h.prototype.set=function(a,b){if(2!==arguments.length)throw g("Invalid parameters to set");a=E(a);b=Q(b);this[v](a,b)||this[l].set(a,b)};h.prototype.forEach=function(a,b){var d=this;F.from(this[l].entries()).sort().forEach(function(e){a.call(b,e[1],e[0],d)})};h.prototype.keys=function(){return(new I(F.from(this[l].entries()).sort())).keys()};h.prototype.values=function(){return(new I(F.from(this[l].entries()).sort())).values()};
+h.prototype.entries=function(){return(new I(F.from(this[l].entries()).sort())).entries()};h.prototype[sa]=h.prototype.entries;w.prototype.clone=function(){var a=null;null!==this[m]&&(a=V(this[m],!0),this[m]=a[0],a=a[1]);return new w(this,{cloneBody:a,signal:this[A]})};P(w.prototype,{cache:{get:function(){return this[B]}},credentials:{get:function(){return this[C]}},headers:{get:function(){return this[n]}},integrity:{get:function(){return this[D]}},method:{get:function(){return this[y]}},mode:{get:function(){return this[p]}},
+redirect:{get:function(){return this[H]}},url:{get:function(){return this[x]}},signal:{get:function(){return this[A]}}});R.call(w.prototype);R.call(r.prototype);r.prototype.clone=function(){var a=null;null!==this[m]&&(a=V(this[m],!0),this[m]=a[0],a=a[1]);return new r(a,{status:this[q],statusText:this[K],headers:G(this[n],L),url:this[x],is_aborted:this[z]})};P(r.prototype,{headers:{get:function(){return this[n]}},ok:{get:function(){return this[U]}},status:{get:function(){return this[q]}},statusText:{get:function(){return this[K]}},
+type:{get:function(){return this[J]}},url:{get:function(){return this[x]}}});r.error=function(){var a=new r(null);a[n][v]=W;a[J]="error";a[q]=0;a[K]="";return a};r.redirect=function(a,b){if(!FetchInternal.isUrlValid(a,!0))throw new g("Invalid URL for response redirect");void 0===b&&(b=302);if(-1===ta.indexOf(b))throw new T("Invalid status code for response redirect");return new r(null,{status:b,headers:{location:a}})};c.Headers=h;c.Request=w;c.Response=r;c.fetch=function(a,b){return new t(function(d,
+e){var c=!1,f=!1,h=new w(a,b),k=new XMLHttpRequest,l=null;if(h.signal.aborted)return e(new DOMException("Aborted","AbortError"));var m=new O({start:function(a){l=a},cancel:function(a){c=!0;k.abort()}}),p=function(){if(!c){c=!0;m.cancel();if(l)try{ReadableStreamDefaultControllerError(l,new DOMException("Aborted","AbortError"))}catch(va){}setTimeout(function(){try{k.abort()}catch(va){}},0)}};k.onload=function(){l.close()};k.onreadystatechange=function(){if(k.readyState===k.HEADERS_RECEIVED){var a={status:k.status,
+statusText:k.statusText,headers:qa(k.getAllResponseHeaders()||"",L)};a.url="responseURL"in k?k.responseURL:a.headers.get("X-Request-URL");try{var b=new r(m,a);h[A].addEventListener("abort",function(){b[z]=!0;p();e(new DOMException("Aborted","AbortError"))});b[J]=f?"cors":"basic";d(b)}catch(wa){e(wa)}}};k.onerror=function(){l.error(new g("Network request failed"));e(new g("Network request failed"))};k.ontimeout=function(){l.error(new g("Network request failed"));e(new g("Network request failed"))};
+k.open(h.method,h.url,!0);"include"===h.credentials&&(k.withCredentials=!0);h.headers.forEach(function(a,b){k.setRequestHeader(b,a)});var n=function(a){c||l.enqueue(a)},q=function(a){f=a};null===h.body?k.fetch(n,q,null):M(h).then(function(a){k.fetch(n,q,a)})})};c.fetch.polyfill=!0}})(this);
\ No newline at end of file
diff --git a/src/cobalt/fetch/fetch.js b/src/cobalt/fetch/fetch.js
index f1e4892..b5de929 100644
--- a/src/cobalt/fetch/fetch.js
+++ b/src/cobalt/fetch/fetch.js
@@ -55,6 +55,9 @@
   const IsReadableStreamDisturbed = self.IsReadableStreamDisturbed
   const IsReadableStreamLocked = self.IsReadableStreamLocked
 
+  const ABORT_ERROR = 'AbortError'
+  const ABORT_MESSAGE = 'Aborted'
+
   const ERROR_INVALID_HEADERS_INIT =
       'Constructing Headers with invalid parameters'
   const ERROR_NETWORK_REQUEST_FAILED = 'Network request failed'
@@ -78,9 +81,6 @@
   const URL_SLOT = Symbol('url')
   const IS_ABORTED_SLOT = Symbol('is_aborted')
   const SIGNAL_SLOT = Symbol('signal')
-  const ONABORT_SLOT = Symbol('onabort')
-  const ABORT_HASH_SLOT = Symbol('abort_hash')
-  const LISTENERS_SLOT = Symbol('listeners')
 
   // Forbidden headers corresponding to various header guard types.
   const INVALID_HEADERS_REQUEST = [
@@ -263,18 +263,6 @@
     return false
   }
 
-  const ABORT_ERROR_ID = 20
-  var AbortException = function() {
-    defineProperties(this, {
-      'message': { value: 'Aborted', writable: false},
-      'name' : { value: 'AbortError', writable: false},
-      'code': { value: ABORT_ERROR_ID, writable: false}
-    })
-  }
-  // TODO: This doesn't work under unit tests, should be implemented in IDL
-  // AbortException.prototype = DOMException
-  AbortException.prototype.constructor = AbortException
-
   // https://fetch.spec.whatwg.org/#headers-class
   function Headers(init) {
     this[MAP_SLOT] = new Map();
@@ -499,7 +487,7 @@
 
     this.arrayBuffer = function() {
       if (this[IS_ABORTED_SLOT]) {
-        return Promise.reject(new AbortException())
+        return Promise.reject(new DOMException(ABORT_MESSAGE, ABORT_ERROR))
       }
       return consumeBodyAsUint8Array(this).then(function(data) {
         return data.buffer
@@ -508,7 +496,7 @@
 
     this.text = function() {
       if (this[IS_ABORTED_SLOT]) {
-        return Promise.reject(new AbortException())
+        return Promise.reject(new DOMException(ABORT_MESSAGE, ABORT_ERROR))
       }
       return consumeBodyAsUint8Array(this).then(function(data) {
         return FetchInternal.decodeFromUTF8(data)
@@ -517,7 +505,7 @@
 
     this.json = function() {
       if (this[IS_ABORTED_SLOT]) {
-        return Promise.reject(new AbortException())
+        return Promise.reject(new DOMException(ABORT_MESSAGE, ABORT_ERROR))
       }
       return this.text().then(JSON.parse)
     }
@@ -533,66 +521,6 @@
     return upcased
   }
 
-  // https://dom.spec.whatwg.org/#interface-AbortSignal
-  function AbortSignal(input) {
-    this[ONABORT_SLOT] = null
-    if(input instanceof AbortSignal) {
-      this[ONABORT_SLOT] = input.onabort
-      this[ABORT_HASH_SLOT] = input[ABORT_HASH_SLOT]
-      this[LISTENERS_SLOT] = input[LISTENERS_SLOT]
-    } else {
-      this[ABORT_HASH_SLOT] = { is_aborted: false }
-      this[LISTENERS_SLOT] = {}
-    }
-
-    defineProperties(this,{
-      'aborted': { get: () => this[ABORT_HASH_SLOT].is_aborted },
-      'onabort': {
-        get: () => this[ONABORT_SLOT],
-        set: value => this[ONABORT_SLOT] = value
-      }
-    })
-  }
-  AbortSignal.prototype.constructor = AbortSignal
-  AbortSignal.prototype.dispatchEvent =  function(ev){
-    if(ev.type === 'abort') {
-      this[ABORT_HASH_SLOT].is_aborted = true
-      if(typeof this[ONABORT_SLOT] === 'function') {
-        this[ONABORT_SLOT].call(this,ev)
-      }
-    }
-    if (!(ev.type in this[LISTENERS_SLOT])) {
-      return
-    }
-    const type_listener_array = this[LISTENERS_SLOT][ev.type]
-    for (var i = type_listener_array.length - 1; i >= 0; i--) {
-      type_listener_array[i].call(this,ev)
-    }
-    return !ev.defaultPrevented
-  }
-  AbortSignal.prototype.addEventListener = function(listener_type, listener) {
-    if (!(listener_type in this[LISTENERS_SLOT])) {
-      this[LISTENERS_SLOT][listener_type] = []
-    }
-    this[LISTENERS_SLOT][listener_type].push(listener)
-  }
-  AbortSignal.prototype.removeEventListener = function(listener_type, listener) {
-    if (!(listener_type in this[LISTENERS_SLOT])) {
-      return
-    }
-    const type_listener_array = this[LISTENERS_SLOT][type]
-    for (var i = 0, l = type_listener_array.length; i < l; i++) {
-      if (type_listener_array[i] === listener) {
-        type_listener_array.splice(i, 1)
-        return
-      }
-    }
-  }
-  AbortSignal.prototype.clone = function() {
-    return new AbortSignal(this)
-  }
-  self.AbortSignal = AbortSignal
-
   // https://fetch.spec.whatwg.org/#request-class
   function Request(input, init) {
     // When cloning a request, |init| will have the non-standard member
@@ -603,6 +531,15 @@
     var body = init.body || init.cloneBody
     var headersInit = init.headers
 
+    // AbortSignal cannot be constructed directly, so create a temporary
+    // AbortController and steal its signal. This signal is only used to follow
+    // another signal, so the controller isn't needed.
+    var tempController = new AbortController()
+    this[SIGNAL_SLOT] = tempController.signal
+
+    // Let signal be null.
+    var signal = null
+
     if (input instanceof Request) {
       this[URL_SLOT] = input.url
       this[CACHE_SLOT] = input.cache
@@ -623,15 +560,8 @@
         input[BODY_USED_SLOT] = true
       }
 
-      if(('signal' in init) && (init.signal == null)) {
-        this[SIGNAL_SLOT] = new AbortSignal()
-      } else {
-        if('signal' in init) {
-          this[SIGNAL_SLOT] = init.signal
-        } else {
-          this[SIGNAL_SLOT] = input[SIGNAL_SLOT]
-        }
-      }
+      // Set signal to input's signal.
+      signal = input[SIGNAL_SLOT]
     } else {
       this[URL_SLOT] = String(input)
       if (!FetchInternal.isUrlValid(this[URL_SLOT],
@@ -640,12 +570,6 @@
       }
       this[MODE_SLOT] = 'cors'
       this[CREDENTIALS_SLOT] = 'same-origin'
-
-      if ((init.signal) && !(init.signal == null) ) {
-        this[SIGNAL_SLOT] = new AbortSignal(init.signal)
-      } else {
-        this[SIGNAL_SLOT] = new AbortSignal()
-      }
     }
 
     if (init.window !== undefined && init.window !== null) {
@@ -706,6 +630,17 @@
     if ((this[METHOD_SLOT] === 'GET' || this[METHOD_SLOT] === 'HEAD') && body) {
       throw new TypeError('Request body is not allowed for GET or HEAD')
     }
+
+    // If init["signal"] exists, then set signal to it.
+    if ('signal' in init) {
+      signal = init.signal
+    }
+
+    // If signal is not null, then make r's signal follow signal.
+    if (signal) {
+      this[SIGNAL_SLOT].follow(signal)
+    }
+
     this._initBody(body)
   }
 
@@ -717,7 +652,7 @@
       this[BODY_SLOT] = streams[0]
       cloneBody = streams[1]
     }
-    return new Request(this, { cloneBody: cloneBody, signal: this[SIGNAL_SLOT].clone() })
+    return new Request(this, { cloneBody: cloneBody, signal: this[SIGNAL_SLOT] })
   }
 
   defineProperties(Request.prototype, {
@@ -863,7 +798,7 @@
       //    Abort fetch with p, request, and null.
       //    Return p.
       if (request.signal.aborted) {
-        return reject(new AbortException())
+        return reject(new DOMException(ABORT_MESSAGE, ABORT_ERROR))
       }
 
       // 5. If requests clients global object is a ServiceWorkerGlobalScope object,
@@ -880,46 +815,22 @@
         }
       })
 
-      var cleanup = function() {
+      var handleAbort = function() {
         if (!cancelled) {
           cancelled = true
           responseStream.cancel()
           if(responseStreamController) {
             try {
-              responseStreamController.close()
+              ReadableStreamDefaultControllerError(responseStreamController,
+                  new DOMException(ABORT_MESSAGE, ABORT_ERROR))
             } catch(_) {}
           }
           setTimeout(function() {
               try {
                 xhr.abort()
               } catch(_) {}
-            },0)
-          }
-      }
-
-      // Intercept getReader calls, and patch returned reader objects for abort
-      // This is required to make reader calls reject correctly with Abort
-      // as a result
-      const getReader_original = responseStream.getReader
-      responseStream.getReader = function() {
-        var reader = getReader_original.bind(this).call()
-        const read_original = reader.read
-        const closed_original = reader.closed
-        reader.read = function() {
-          if(request[SIGNAL_SLOT] && request[SIGNAL_SLOT].aborted) {
-            cleanup()
-            return Promise.reject(new AbortException())
-          }
-          return read_original.bind(this).call()
+            }, 0)
         }
-        defineProperty(reader,'closed',{ get: function() {
-            if(request[SIGNAL_SLOT] && request[SIGNAL_SLOT].aborted) {
-              cleanup()
-              return Promise.reject(new AbortException())
-            }
-            return closed_original
-          }})
-        return reader
       }
 
       xhr.onload = function() {
@@ -946,8 +857,8 @@
               // 8.2 Abort fetch with p, request, and responseObject.
               // 8.3 Terminate the ongoing fetch with the aborted flag set.
               response[IS_ABORTED_SLOT] = true
-              cleanup()
-              reject(new AbortException())
+              handleAbort()
+              reject(new DOMException(ABORT_MESSAGE, ABORT_ERROR))
             })
 
             response[TYPE_SLOT] = isCORSMode ? 'cors' : 'basic'
@@ -1009,14 +920,5 @@
     })
   }
 
-  // https://dom.spec.whatwg.org/#interface-abortcontroller
-  function AbortController() {
-    defineProperty(this, 'signal', {value: new AbortSignal(), writable: false})
-  }
-  AbortController.prototype.abort = function() {
-    this.signal.dispatchEvent(new Event('abort'))
-  }
-  self.AbortController = AbortController
-
   self.fetch.polyfill = true
 })(this);
diff --git a/src/cobalt/h5vcc/h5vcc.cc b/src/cobalt/h5vcc/h5vcc.cc
index 5ba9959..701d785 100644
--- a/src/cobalt/h5vcc/h5vcc.cc
+++ b/src/cobalt/h5vcc/h5vcc.cc
@@ -33,6 +33,7 @@
 #if defined(COBALT_ENABLE_SSO)
   sso_ = new H5vccSso();
 #endif
+  storage_ = new H5vccStorage(settings.network_module);
   system_ = new H5vccSystem();
   trace_event_ = new H5vccTraceEvent();
 }
@@ -46,6 +47,7 @@
   tracer->Trace(runtime_);
   tracer->Trace(settings_);
   tracer->Trace(sso_);
+  tracer->Trace(storage_);
   tracer->Trace(system_);
   tracer->Trace(trace_event_);
 }
diff --git a/src/cobalt/h5vcc/h5vcc.gyp b/src/cobalt/h5vcc/h5vcc.gyp
index 3378152..18a74fe 100644
--- a/src/cobalt/h5vcc/h5vcc.gyp
+++ b/src/cobalt/h5vcc/h5vcc.gyp
@@ -48,6 +48,8 @@
         'h5vcc_runtime_event_target.h',
         'h5vcc_settings.cc',
         'h5vcc_settings.h',
+        'h5vcc_storage.cc',
+        'h5vcc_storage.h',
         'h5vcc_system.cc',
         'h5vcc_system.h',
         'h5vcc_trace_event.cc',
diff --git a/src/cobalt/h5vcc/h5vcc.h b/src/cobalt/h5vcc/h5vcc.h
index 210f29e..d87120f 100644
--- a/src/cobalt/h5vcc/h5vcc.h
+++ b/src/cobalt/h5vcc/h5vcc.h
@@ -28,6 +28,7 @@
 #include "cobalt/h5vcc/h5vcc_runtime.h"
 #include "cobalt/h5vcc/h5vcc_settings.h"
 #include "cobalt/h5vcc/h5vcc_sso.h"
+#include "cobalt/h5vcc/h5vcc_storage.h"
 #include "cobalt/h5vcc/h5vcc_system.h"
 #include "cobalt/h5vcc/h5vcc_trace_event.h"
 #include "cobalt/script/wrappable.h"
@@ -68,6 +69,7 @@
 #if defined(COBALT_ENABLE_SSO)
   const scoped_refptr<H5vccSso>& sso() const { return sso_; }
 #endif
+  const scoped_refptr<H5vccStorage>& storage() const { return storage_; }
   const scoped_refptr<H5vccSystem>& system() const { return system_; }
   const scoped_refptr<H5vccTraceEvent>& trace_event() const {
     return trace_event_;
@@ -85,6 +87,7 @@
   scoped_refptr<H5vccRuntime> runtime_;
   scoped_refptr<H5vccSettings> settings_;
   scoped_refptr<H5vccSso> sso_;
+  scoped_refptr<H5vccStorage> storage_;
   scoped_refptr<H5vccSystem> system_;
   scoped_refptr<H5vccTraceEvent> trace_event_;
 
diff --git a/src/cobalt/h5vcc/h5vcc.idl b/src/cobalt/h5vcc/h5vcc.idl
index ed7818d..5155763 100644
--- a/src/cobalt/h5vcc/h5vcc.idl
+++ b/src/cobalt/h5vcc/h5vcc.idl
@@ -18,9 +18,9 @@
 // APIs which allow clients to call non-standard native functions that we
 // expose.
 //
-// For example we provide a h5vcc.accessibility.textToSpeech, which tells
-// whether the platform supports text-to-speech capability. Other H5vcc
-// modules can run an in-app DIAL server or expose availables CVals.
+// For example we provide a h5vcc.storage.ClearCookies(), which can empty the
+// cookie jar in response to the user's request. Other H5vcc modules expose
+// audio capabilities about the platform, or run an in-app DIAL server.
 //
 // The H5vcc node should just be a collection of readonly sub-nodes.
 // This is created by the BrowserModule and passed directly to the Window
@@ -37,6 +37,7 @@
   readonly attribute H5vccSettings settings;
   [Conditional=COBALT_ENABLE_SSO]
       readonly attribute H5vccSso sso;
+  readonly attribute H5vccStorage storage;
   readonly attribute H5vccSystem system;
   readonly attribute H5vccTraceEvent traceEvent;
 };
diff --git a/src/cobalt/h5vcc/h5vcc_storage.cc b/src/cobalt/h5vcc/h5vcc_storage.cc
new file mode 100644
index 0000000..8bc8c5d
--- /dev/null
+++ b/src/cobalt/h5vcc/h5vcc_storage.cc
@@ -0,0 +1,54 @@
+// Copyright 2015 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "cobalt/h5vcc/h5vcc_storage.h"
+
+#include "cobalt/storage/storage_manager.h"
+#include "net/url_request/url_request_context.h"
+
+namespace cobalt {
+namespace h5vcc {
+
+H5vccStorage::H5vccStorage(network::NetworkModule* network_module)
+    : network_module_(network_module) {}
+
+void H5vccStorage::ClearCookies() {
+  net::CookieStore* cookie_store =
+      network_module_->url_request_context()->cookie_store();
+  auto* cookie_monster = static_cast<net::CookieMonster*>(cookie_store);
+  network_module_->task_runner()->PostBlockingTask(
+      FROM_HERE,
+      base::Bind(&net::CookieMonster::DeleteAllMatchingInfoAsync,
+                 base::Unretained(cookie_monster), net::CookieDeletionInfo(),
+                 base::Passed(net::CookieStore::DeleteCallback())));
+}
+
+void H5vccStorage::Flush(const base::Optional<bool>& sync) {
+  if (sync.value_or(false) == true) {
+    DLOG(WARNING) << "Synchronous flush is not supported.";
+  }
+
+  network_module_->storage_manager()->FlushNow(base::Closure());
+}
+
+bool H5vccStorage::GetCookiesEnabled() {
+  return network_module_->network_delegate()->cookies_enabled();
+}
+
+void H5vccStorage::SetCookiesEnabled(bool enabled) {
+  network_module_->network_delegate()->set_cookies_enabled(enabled);
+}
+
+}  // namespace h5vcc
+}  // namespace cobalt
diff --git a/src/cobalt/h5vcc/h5vcc_storage.h b/src/cobalt/h5vcc/h5vcc_storage.h
new file mode 100644
index 0000000..613f024
--- /dev/null
+++ b/src/cobalt/h5vcc/h5vcc_storage.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef COBALT_H5VCC_H5VCC_STORAGE_H_
+#define COBALT_H5VCC_H5VCC_STORAGE_H_
+
+#include "base/optional.h"
+#include "cobalt/network/network_module.h"
+#include "cobalt/script/wrappable.h"
+
+namespace cobalt {
+namespace h5vcc {
+
+class H5vccStorage : public script::Wrappable {
+ public:
+  explicit H5vccStorage(network::NetworkModule* network_module);
+  void ClearCookies();
+  void Flush(const base::Optional<bool>& sync);
+  bool GetCookiesEnabled();
+  void SetCookiesEnabled(bool enabled);
+
+  DEFINE_WRAPPABLE_TYPE(H5vccStorage);
+
+ private:
+  network::NetworkModule* network_module_;
+
+  DISALLOW_COPY_AND_ASSIGN(H5vccStorage);
+};
+
+}  // namespace h5vcc
+}  // namespace cobalt
+
+#endif  // COBALT_H5VCC_H5VCC_STORAGE_H_
diff --git a/src/cobalt/h5vcc/h5vcc_storage.idl b/src/cobalt/h5vcc/h5vcc_storage.idl
new file mode 100644
index 0000000..7a30dec
--- /dev/null
+++ b/src/cobalt/h5vcc/h5vcc_storage.idl
@@ -0,0 +1,21 @@
+// Copyright 2015 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+interface H5vccStorage {
+  void clearCookies();
+  // We don't support synchronous flush, this is legacy.
+  void flush(optional boolean sync = false);
+  boolean getCookiesEnabled();
+  void setCookiesEnabled(boolean value);
+};
diff --git a/src/cobalt/layout/block_container_box.h b/src/cobalt/layout/block_container_box.h
index 510989c..21ace30 100644
--- a/src/cobalt/layout/block_container_box.h
+++ b/src/cobalt/layout/block_container_box.h
@@ -80,6 +80,10 @@
 
   BaseDirection base_direction() const { return base_direction_; }
 
+  LayoutUnit GetShrinkToFitWidth(
+      LayoutUnit containing_block_width,
+      const base::Optional<LayoutUnit>& maybe_height);
+
  protected:
   // From |Box|.
   bool IsTransformable() const override;
@@ -147,10 +151,6 @@
       const base::Optional<LayoutUnit>& maybe_margin_bottom,
       const FormattingContext& formatting_context);
 
-  LayoutUnit GetShrinkToFitWidth(
-      LayoutUnit containing_block_width,
-      const base::Optional<LayoutUnit>& maybe_height);
-
   // A vertical offset of the baseline of the last child box that has one,
   // relatively to the origin of the block container box. Disengaged, if none
   // of the child boxes have a baseline.
diff --git a/src/cobalt/layout/flex_container_box.cc b/src/cobalt/layout/flex_container_box.cc
index ae418bd..bacd234 100644
--- a/src/cobalt/layout/flex_container_box.cc
+++ b/src/cobalt/layout/flex_container_box.cc
@@ -38,7 +38,11 @@
 FlexContainerBox::~FlexContainerBox() {}
 
 void FlexContainerBox::DetermineAvailableSpace(
-    const LayoutParams& layout_params, bool main_direction_is_horizontal) {
+    const LayoutParams& layout_params, bool main_direction_is_horizontal,
+    bool width_depends_on_containing_block,
+    const base::Optional<LayoutUnit>& maybe_width,
+    bool height_depends_on_containing_block,
+    const base::Optional<LayoutUnit>& maybe_height) {
   // Line Length Determination:
   //   https://www.w3.org/TR/css-flexbox-1/#line-sizing
   // 2. Determine the available main and cross space for the flex items.
@@ -46,15 +50,6 @@
   base::Optional<LayoutUnit> cross_space;
   bool main_space_depends_on_containing_block;
 
-  bool width_depends_on_containing_block;
-  base::Optional<LayoutUnit> maybe_width = GetUsedWidthIfNotAuto(
-      computed_style(), layout_params.containing_block_size,
-      &width_depends_on_containing_block);
-  bool height_depends_on_containing_block;
-  base::Optional<LayoutUnit> maybe_height = GetUsedHeightIfNotAuto(
-      computed_style(), layout_params.containing_block_size,
-      &height_depends_on_containing_block);
-
   base::Optional<LayoutUnit> min_width = GetUsedMinWidthIfNotAuto(
       computed_style(), layout_params.containing_block_size, NULL);
   base::Optional<LayoutUnit> max_width = GetUsedMaxWidthIfNotNone(
@@ -175,7 +170,19 @@
   //   https://www.w3.org/TR/css-flexbox-1/#line-sizing
   // 2. Determine the available main and cross space for the flex items.
   //      https://www.w3.org/TR/css-flexbox-1/#algo-available
-  DetermineAvailableSpace(layout_params, main_direction_is_horizontal);
+
+  bool width_depends_on_containing_block;
+  base::Optional<LayoutUnit> maybe_width = GetUsedWidthIfNotAuto(
+      computed_style(), layout_params.containing_block_size,
+      &width_depends_on_containing_block);
+  bool height_depends_on_containing_block;
+  base::Optional<LayoutUnit> maybe_height = GetUsedHeightIfNotAuto(
+      computed_style(), layout_params.containing_block_size,
+      &height_depends_on_containing_block);
+
+  DetermineAvailableSpace(layout_params, main_direction_is_horizontal,
+                          width_depends_on_containing_block, maybe_width,
+                          height_depends_on_containing_block, maybe_height);
 
   // 3. Determine the flex base size and hypothetical main size of each item.
   //      https://www.w3.org/TR/css-flexbox-1/#algo-main-item
@@ -201,7 +208,7 @@
       flex_formatting_context.UpdateRect(child_box);
 
       auto item = FlexItem::Create(child_box, main_direction_is_horizontal);
-      item->DetermineFlexBaseSize(child_layout_params, main_space_,
+      item->DetermineFlexBaseSize(main_space_,
                                   layout_params.shrink_to_fit_width_forced);
       item->DetermineHypotheticalMainSize(
           child_layout_params.containing_block_size);
@@ -209,22 +216,41 @@
     }
   }
 
+  base::Optional<LayoutUnit> maybe_margin_left = GetUsedMarginLeftIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+  base::Optional<LayoutUnit> maybe_margin_right = GetUsedMarginRightIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+  base::Optional<LayoutUnit> maybe_left = GetUsedLeftIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+  base::Optional<LayoutUnit> maybe_right = GetUsedRightIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+
+  base::Optional<LayoutUnit> maybe_margin_top = GetUsedMarginTopIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+  base::Optional<LayoutUnit> maybe_margin_bottom = GetUsedMarginBottomIfNotAuto(
+      computed_style(), layout_params.containing_block_size);
+
+  if (IsAbsolutelyPositioned()) {
+    UpdateWidthAssumingAbsolutelyPositionedBox(
+        layout_params.containing_block_size.width(), maybe_left, maybe_right,
+        maybe_width, maybe_margin_left, maybe_margin_right, maybe_height);
+
+    base::Optional<LayoutUnit> maybe_top = GetUsedTopIfNotAuto(
+        computed_style(), layout_params.containing_block_size);
+    base::Optional<LayoutUnit> maybe_bottom = GetUsedBottomIfNotAuto(
+        computed_style(), layout_params.containing_block_size);
+
+    UpdateHeightAssumingAbsolutelyPositionedBox(
+        layout_params.containing_block_size.height(), maybe_top, maybe_bottom,
+        maybe_height, maybe_margin_top, maybe_margin_bottom,
+        flex_formatting_context);
+  }
+
   LayoutUnit main_size = LayoutUnit();
   // 4. Determine the main size of the flex container using the rules of the
   // formatting context in which it participates.
   if (main_direction_is_horizontal) {
     if (!layout_params.freeze_width) {
-      bool width_depends_on_containing_block = true;
-      base::Optional<LayoutUnit> maybe_margin_left = GetUsedMarginLeftIfNotAuto(
-          computed_style(), layout_params.containing_block_size);
-      base::Optional<LayoutUnit> maybe_margin_right =
-          GetUsedMarginRightIfNotAuto(computed_style(),
-                                      layout_params.containing_block_size);
-      base::Optional<LayoutUnit> maybe_left = GetUsedLeftIfNotAuto(
-          computed_style(), layout_params.containing_block_size);
-      base::Optional<LayoutUnit> maybe_right = GetUsedRightIfNotAuto(
-          computed_style(), layout_params.containing_block_size);
-
       UpdateContentWidthAndMargins(
           layout_params.containing_block_size.width(),
           layout_params.shrink_to_fit_width_forced,
@@ -281,19 +307,8 @@
     set_width(flex_formatting_context.cross_size());
   }
 
-  base::Optional<LayoutUnit> maybe_margin_left = GetUsedMarginLeftIfNotAuto(
-      computed_style(), layout_params.containing_block_size);
-  base::Optional<LayoutUnit> maybe_margin_right = GetUsedMarginRightIfNotAuto(
-      computed_style(), layout_params.containing_block_size);
-
   set_margin_left(maybe_margin_left.value_or(LayoutUnit()));
   set_margin_right(maybe_margin_right.value_or(LayoutUnit()));
-
-  base::Optional<LayoutUnit> maybe_margin_top = GetUsedMarginTopIfNotAuto(
-      computed_style(), layout_params.containing_block_size);
-  base::Optional<LayoutUnit> maybe_margin_bottom = GetUsedMarginBottomIfNotAuto(
-      computed_style(), layout_params.containing_block_size);
-
   set_margin_top(maybe_margin_top.value_or(LayoutUnit()));
   set_margin_bottom(maybe_margin_bottom.value_or(LayoutUnit()));
   if (child_boxes().empty()) {
@@ -307,6 +322,14 @@
     WrapAtPolicy wrap_at_policy, WrapOpportunityPolicy wrap_opportunity_policy,
     bool is_line_existence_justified, LayoutUnit available_width,
     bool should_collapse_trailing_white_space) {
+  DCHECK(!IsAbsolutelyPositioned());
+  // Wrapping is not allowed until the line's existence is justified, meaning
+  // that wrapping cannot occur before the box. Given that this box cannot be
+  // split, no wrappable point is available.
+  if (!is_line_existence_justified) {
+    return kWrapResultNoWrap;
+  }
+
   return (GetLevel() == kInlineLevel) ? kWrapResultWrapBefore
                                       : kWrapResultNoWrap;
 }
diff --git a/src/cobalt/layout/flex_container_box.h b/src/cobalt/layout/flex_container_box.h
index 5c5007b..a962d44 100644
--- a/src/cobalt/layout/flex_container_box.h
+++ b/src/cobalt/layout/flex_container_box.h
@@ -114,12 +114,11 @@
 
   // First step of the line length determination.
   void DetermineAvailableSpace(const LayoutParams& layout_params,
-                               bool main_direction_is_horizontal);
-
-  // Determine the flex base size and hypothetical main size of the item.
-  //   https://www.w3.org/TR/css-flexbox-1/#algo-main-item
-  LayoutUnit DetermineFlexBaseSize(Box* item, const LayoutParams& layout_params,
-                                   bool container_shrink_to_fit_width_forced);
+                               bool main_direction_is_horizontal,
+                               bool width_depends_on_containing_block,
+                               const base::Optional<LayoutUnit>& maybe_width,
+                               bool height_depends_on_containing_block,
+                               const base::Optional<LayoutUnit>& maybe_height);
 
   AnonymousBlockBox* GetLastChildAsAnonymousBlockBox();
   AnonymousBlockBox* GetOrAddAnonymousBlockBox();
diff --git a/src/cobalt/layout/flex_formatting_context.cc b/src/cobalt/layout/flex_formatting_context.cc
index 7a7a9e7..af19fc0 100644
--- a/src/cobalt/layout/flex_formatting_context.cc
+++ b/src/cobalt/layout/flex_formatting_context.cc
@@ -103,7 +103,7 @@
 
   // If the flex container is single-line and has a definite cross size, the
   // cross size of the flex line is the flex container's inner cross size.
-  if (!multi_line_ && cross_space) {
+  if (!multi_line_ && cross_space && !lines_.empty()) {
     lines_.front()->set_cross_size(*cross_space);
   } else {
     // Otherwise, for each flex line:
@@ -115,7 +115,7 @@
   // If the flex container is single-line, then clamp the line's cross-size
   // to be within the container's computed min and max cross sizes.
   //   https://www.w3.org/TR/css-flexbox-1/#change-201403-clamp-single-line
-  if (!multi_line_) {
+  if (!multi_line_ && !lines_.empty()) {
     LayoutUnit line_cross_size = lines_.front()->cross_size();
     if (min_cross_space && line_cross_size < *min_cross_space) {
       lines_.front()->set_cross_size(*min_cross_space);
diff --git a/src/cobalt/layout/flex_item.cc b/src/cobalt/layout/flex_item.cc
index 45370f9..231594b 100644
--- a/src/cobalt/layout/flex_item.cc
+++ b/src/cobalt/layout/flex_item.cc
@@ -20,6 +20,7 @@
 #include "base/memory/ptr_util.h"
 #include "cobalt/cssom/css_computed_style_data.h"
 #include "cobalt/cssom/number_value.h"
+#include "cobalt/layout/block_container_box.h"
 #include "cobalt/layout/box.h"
 #include "cobalt/layout/container_box.h"
 #include "cobalt/layout/used_style.h"
@@ -340,7 +341,6 @@
 }
 
 void FlexItem::DetermineFlexBaseSize(
-    const LayoutParams& layout_params,
     const base::Optional<LayoutUnit>& main_space,
     bool container_shrink_to_fit_width_forced) {
   // Absolutely positioned boxes are not flex items.
@@ -357,7 +357,7 @@
   bool flex_basis_depends_on_available_space;
   base::Optional<LayoutUnit> flex_basis = GetUsedFlexBasisIfNotContent(
       computed_style(), main_direction_is_horizontal_,
-      layout_params.containing_block_size,
+      main_space.value_or(LayoutUnit()),
       &flex_basis_depends_on_available_space);
   bool flex_basis_is_definite =
       flex_basis && (!flex_basis_depends_on_available_space || main_space);
@@ -434,21 +434,14 @@
   // size suggestion is that size (clamped by its max main size property if
   // it's definite). It is otherwise undefined.
   //   https://www.w3.org/TR/css-flexbox-1/#specified-size-suggestion
-  base::Optional<LayoutUnit> specified_min_size_suggestion =
-      GetUsedMinMainAxisSizeIfNotAuto(containing_block_size);
-
   base::Optional<LayoutUnit> specified_size_suggestion =
       GetUsedMainAxisSizeIfNotAuto(containing_block_size);
-  if (specified_size_suggestion.has_value()) {
-    return specified_min_size_suggestion;
-  }
-
   base::Optional<LayoutUnit> maybe_max_main_size =
       GetUsedMaxMainAxisSizeIfNotNone(containing_block_size);
-  if (specified_min_size_suggestion.has_value() &&
-      maybe_max_main_size.has_value()) {
-    specified_min_size_suggestion =
-        std::min(*maybe_max_main_size, *specified_min_size_suggestion);
+  if (maybe_max_main_size.has_value() &&
+      specified_size_suggestion.has_value()) {
+    specified_size_suggestion =
+        std::min(*maybe_max_main_size, *specified_size_suggestion);
   }
 
   // The content size suggestion is the min-content size in the main axis,
@@ -456,28 +449,40 @@
   //   https://www.w3.org/TR/css-flexbox-1/#content-size-suggestion
   base::Optional<LayoutUnit> content_size_suggestion;
   if (OverflowIsVisible()) {
-    content_size_suggestion = GetContentBoxMainSize();
+    if (main_direction_is_horizontal_) {
+      base::Optional<LayoutUnit> maybe_height =
+          GetUsedHeightIfNotAuto(computed_style(), containing_block_size, NULL);
+      content_size_suggestion =
+          box()->AsBlockContainerBox()->GetShrinkToFitWidth(
+              containing_block_size.width(), maybe_height);
+    } else {
+      content_size_suggestion = GetContentBoxMainSize();
+    }
     if (maybe_max_main_size.has_value()) {
       content_size_suggestion =
           std::min(*maybe_max_main_size, *content_size_suggestion);
     }
   }
 
-  if (!specified_min_size_suggestion.has_value()) {
-    // If the box has neither a specified size suggestion nor an aspect ratio,
-    // its content-based minimum size is the content size suggestion.
-    return content_size_suggestion;
-  } else {
-    if (content_size_suggestion.has_value()) {
-      // In general, the content-based minimum size of a flex item is the
-      // smaller of its content size suggestion and its specified size
-      // suggestion.
-      specified_min_size_suggestion =
-          std::min(*content_size_suggestion, *specified_min_size_suggestion);
-      return specified_min_size_suggestion;
-    }
+  // If the box has neither a specified size suggestion nor an aspect ratio,
+  // its content-based minimum size is the content size suggestion.
+  base::Optional<LayoutUnit> content_based_minimum_size =
+      content_size_suggestion;
+  // In general, the content-based minimum size of a flex item is the smaller
+  // of its content size suggestion and its specified size suggestion.
+  if (content_size_suggestion.has_value() &&
+      specified_size_suggestion.has_value()) {
+    content_based_minimum_size =
+        std::min(*content_size_suggestion, *specified_size_suggestion);
   }
-  return specified_min_size_suggestion;
+
+  base::Optional<LayoutUnit> specified_min_size_suggestion =
+      GetUsedMinMainAxisSizeIfNotAuto(containing_block_size);
+  if (specified_min_size_suggestion.has_value()) {
+    content_based_minimum_size = specified_min_size_suggestion;
+  }
+
+  return content_based_minimum_size;
 }
 
 }  // namespace layout
diff --git a/src/cobalt/layout/flex_item.h b/src/cobalt/layout/flex_item.h
index 91d16bf..becc390 100644
--- a/src/cobalt/layout/flex_item.h
+++ b/src/cobalt/layout/flex_item.h
@@ -80,8 +80,7 @@
 
   // Determine the flex base size.
   //   https://www.w3.org/TR/css-flexbox-1/#flex-base-size
-  void DetermineFlexBaseSize(const LayoutParams& layout_params,
-                             const base::Optional<LayoutUnit>& main_space,
+  void DetermineFlexBaseSize(const base::Optional<LayoutUnit>& main_space,
                              bool container_shrink_to_fit_width_forced);
 
   // Determine the hypothetical main size.
diff --git a/src/cobalt/layout/used_style.cc b/src/cobalt/layout/used_style.cc
index 76ce1cc..cd89a85 100644
--- a/src/cobalt/layout/used_style.cc
+++ b/src/cobalt/layout/used_style.cc
@@ -1706,16 +1706,13 @@
 //   https://www.w3.org/TR/css-flexbox-1/#flex-basis-property
 base::Optional<LayoutUnit> GetUsedFlexBasisIfNotContent(
     const scoped_refptr<const cssom::CSSComputedStyleData>& computed_style,
-    const bool main_direction_is_horizontal,
-    const SizeLayoutUnit& flex_container_size,
+    bool main_direction_is_horizontal,
+    LayoutUnit main_space,
     bool* flex_basis_depends_on_available_space) {
   // Percentage values of flex-basis are resolved against the flex item's
   // containing block (i.e. its flex container).
   //   https://www.w3.org/TR/css-flexbox-1/#flex-basis-property
-  LayoutUnit flex_container_main_size = main_direction_is_horizontal
-                                            ? flex_container_size.width()
-                                            : flex_container_size.height();
-  UsedFlexBasisProvider used_flex_basis_provider(flex_container_main_size);
+  UsedFlexBasisProvider used_flex_basis_provider(main_space);
   computed_style->flex_basis()->Accept(&used_flex_basis_provider);
   if (used_flex_basis_provider.flex_basis_is_auto()) {
     // The auto keyword retrieves the value of the main size property as
@@ -1723,9 +1720,11 @@
     // value is content.
     //   https://www.w3.org/TR/css-flexbox-1/#valdef-flex-basis-auto
     if (main_direction_is_horizontal) {
+      SizeLayoutUnit flex_container_size(main_space, LayoutUnit());
       return GetUsedWidthIfNotAuto(computed_style, flex_container_size,
                                    flex_basis_depends_on_available_space);
     } else {
+      SizeLayoutUnit flex_container_size(LayoutUnit(), main_space);
       return GetUsedHeightIfNotAuto(computed_style, flex_container_size,
                                     flex_basis_depends_on_available_space);
     }
diff --git a/src/cobalt/layout/used_style.h b/src/cobalt/layout/used_style.h
index f2a859a..0dbd9d3 100644
--- a/src/cobalt/layout/used_style.h
+++ b/src/cobalt/layout/used_style.h
@@ -381,8 +381,8 @@
     const SizeLayoutUnit& containing_block_size);
 base::Optional<LayoutUnit> GetUsedFlexBasisIfNotContent(
     const scoped_refptr<const cssom::CSSComputedStyleData>& computed_style,
-    const bool main_direction_is_horizontal,
-    const SizeLayoutUnit& flex_container_size,
+    bool main_direction_is_horizontal,
+    LayoutUnit main_space,
     bool* flex_basis_depends_on_available_space);
 base::Optional<LayoutUnit> GetUsedWidthIfNotAuto(
     const scoped_refptr<const cssom::CSSComputedStyleData>& computed_style,
diff --git a/src/cobalt/layout/used_style_test.cc b/src/cobalt/layout/used_style_test.cc
index f19fa22..e381683 100644
--- a/src/cobalt/layout/used_style_test.cc
+++ b/src/cobalt/layout/used_style_test.cc
@@ -436,13 +436,15 @@
   SizeLayoutUnit flex_container_size(LayoutUnit(200), LayoutUnit(80));
   bool depends_on_flex_container = false;
   auto used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, true, flex_container_size, &depends_on_flex_container);
+      computed_style, true, flex_container_size.width(),
+      &depends_on_flex_container);
   EXPECT_TRUE(depends_on_flex_container);
   EXPECT_FALSE(used_flex_basis);
 
   depends_on_flex_container = false;
-  used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, false, flex_container_size, &depends_on_flex_container);
+  used_flex_basis = GetUsedFlexBasisIfNotContent(computed_style, false,
+                                                 flex_container_size.height(),
+                                                 &depends_on_flex_container);
   EXPECT_TRUE(depends_on_flex_container);
   EXPECT_FALSE(used_flex_basis);
 }
@@ -454,14 +456,16 @@
   SizeLayoutUnit flex_container_size(LayoutUnit(200), LayoutUnit(80));
   bool depends_on_flex_container = false;
   auto used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, true, flex_container_size, &depends_on_flex_container);
+      computed_style, true, flex_container_size.width(),
+      &depends_on_flex_container);
   EXPECT_TRUE(depends_on_flex_container);
   EXPECT_TRUE(used_flex_basis);
   EXPECT_EQ(*used_flex_basis, LayoutUnit(50));
 
   depends_on_flex_container = false;
-  used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, false, flex_container_size, &depends_on_flex_container);
+  used_flex_basis = GetUsedFlexBasisIfNotContent(computed_style, false,
+                                                 flex_container_size.height(),
+                                                 &depends_on_flex_container);
   EXPECT_TRUE(depends_on_flex_container);
   EXPECT_TRUE(used_flex_basis);
   EXPECT_EQ(*used_flex_basis, LayoutUnit(20));
@@ -475,14 +479,16 @@
   SizeLayoutUnit flex_container_size(LayoutUnit(200), LayoutUnit(80));
   bool depends_on_flex_container = false;
   auto used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, true, flex_container_size, &depends_on_flex_container);
+      computed_style, true, flex_container_size.width(),
+      &depends_on_flex_container);
   EXPECT_FALSE(depends_on_flex_container);
   EXPECT_TRUE(used_flex_basis);
   EXPECT_EQ(*used_flex_basis, LayoutUnit(25));
 
   depends_on_flex_container = false;
-  used_flex_basis = GetUsedFlexBasisIfNotContent(
-      computed_style, false, flex_container_size, &depends_on_flex_container);
+  used_flex_basis = GetUsedFlexBasisIfNotContent(computed_style, false,
+                                                 flex_container_size.height(),
+                                                 &depends_on_flex_container);
   EXPECT_FALSE(depends_on_flex_container);
   EXPECT_TRUE(used_flex_basis);
   EXPECT_EQ(*used_flex_basis, LayoutUnit(25));
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001-expected.png
new file mode 100644
index 0000000..3dbc055
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001.html
new file mode 100644
index 0000000..815c29f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-001.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+        <title>CSS Test: The 'flex' shorthand adjusting the 'flex-grow' sub-property</title>
+        <link href="http://www.microsoft.com/" rel="author" title="Microsoft">
+        <link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+        <link href="reference/justify-content-001-ref.htm" rel="match">
+        <meta content="" name="flags">
+        <meta content="This test checks that the flex grow factor determines the distribution of positive free space." name="assert">
+        <style type="text/css">
+            body {
+              margin: 0px;
+              background-color: white;
+              font-family: Roboto;
+              font-size: 16px;
+            }
+            #flexbox
+            {
+                background-color: red;
+                display: flex;
+                width: 300px;
+            }
+            div div
+            {
+                background-color: #ffa500;
+                flex: 1 0 auto;
+                height: 100px;
+            }
+            #flexItem1
+            {
+                background-color: blue;
+            }
+        </style>
+    </head>
+    <body>
+        <span>Test passes if there is a single blue rectangle on the left, a single orange rectangle directly to its right, and there is no red visible on the page.</span>
+        <div id="flexbox">
+            <div id="flexItem1"></div>
+            <div></div>
+        </div>
+    
+
+</body></html>
+
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002-expected.png
new file mode 100644
index 0000000..3dbc055
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002.html
new file mode 100644
index 0000000..707d15f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-002.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+        <title>CSS Test: The 'flex' shorthand adjusting the 'flex-shrink' sub-property</title>
+        <link href="http://www.microsoft.com/" rel="author" title="Microsoft">
+        <link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+        <link href="reference/justify-content-001-ref.htm" rel="match">
+        <meta content="" name="flags">
+        <meta content="This test checks that the flex shrink factor is multiplied by the flex base size when distributing negative space." name="assert">
+        <style type="text/css">
+            body {
+              margin: 0px;
+              background-color: white;
+              font-family: Roboto;
+              font-size: 16px;
+            }
+            div
+            {
+                height: 50px;
+            }
+            #flexbox
+            {
+                background-color: red;
+                display: flex;
+                width: 300px;
+            }
+            #flexItem1
+            {
+                flex: 0 2 auto;
+                width: 300px;
+            }
+            #flexItem2
+            {
+                width: 200px;
+            }
+            #flexItem1, #ref1
+            {
+                background-color: blue;
+            }
+            #flexItem2, #ref2
+            {
+                background-color: #ffa500;
+            }
+            #ref1, #ref2
+            {
+                display: inline-block;
+                width: 150px;
+            }
+        </style>
+    </head>
+    <body>
+        <span>Test passes if there is a single blue rectangle on the left, a single orange rectangle directly to its right, and there is no red visible on the page.</span>
+        <div id="flexbox">
+            <div id="flexItem1"></div>
+            <div id="flexItem2"></div>
+        </div>
+        <div id="ref1"></div><div id="ref2"></div>
+    
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003-expected.png
new file mode 100644
index 0000000..3dbc055
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003.html
new file mode 100644
index 0000000..0051e30
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-003.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+        <title>CSS Test: Comparing two different elements using different values for the 'flex-grow' sub-property on the 'flex' shorthand</title>
+        <link href="http://www.microsoft.com/" rel="author" title="Microsoft">
+        <link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+        <link href="reference/justify-content-001-ref.htm" rel="match">
+        <meta content="" name="flags">
+        <meta content="This test checks that the flex items with a different flex grow factor have different flexibilities." name="assert">
+        <style type="text/css">
+            body {
+              margin: 0px;
+              background-color: white;
+              font-family: Roboto;
+              font-size: 16px;
+            }
+            div
+            {
+                height: 50px;
+            }
+            #flexbox
+            {
+                background-color: red;
+                display: flex;
+                width: 300px;
+            }
+            #flexItem1
+            {
+                flex: 1 0 auto;
+                width: 100px;
+            }
+            #flexItem2
+            {
+                flex: 2 0 auto;
+                width: 50px;
+            }
+            #flexItem1, #ref1
+            {
+                background-color: blue;
+            }
+            #flexItem2, #ref2
+            {
+                background-color: #ffa500;
+            }
+            #ref1, #ref2
+            {
+                display: inline-block;
+                width: 150px;
+            }
+        </style>
+    </head>
+    <body>
+        <span>Test passes if there is a single blue rectangle on the left, a single orange rectangle directly to its right, and there is no red visible on the page.</span>
+        <div id="flexbox">
+            <div id="flexItem1"></div>
+            <div id="flexItem2"></div>
+        </div>
+        <div id="ref1"></div><div id="ref2"></div>
+    
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004-expected.png
new file mode 100644
index 0000000..3dbc055
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004.html
new file mode 100644
index 0000000..6ab472d
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-004.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+        <title>CSS Test: Comparing two different elements using different values for the 'flex-shrink' sub-property on the 'flex' shorthand</title>
+        <link href="http://www.microsoft.com/" rel="author" title="Microsoft">
+        <link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+        <link href="reference/justify-content-001-ref.htm" rel="match">
+        <meta content="" name="flags">
+        <meta content="This test checks that the flex items with a different flex shrink factor have different flexibilities." name="assert">
+        <style type="text/css">
+            body {
+              margin: 0px;
+              background-color: white;
+              font-family: Roboto;
+              font-size: 16px;
+            }
+            div
+            {
+                height: 50px;
+            }
+            #flexbox
+            {
+                background-color: red;
+                display: flex;
+                width: 300px;
+            }
+            #flexItem1
+            {
+                flex: 0 2 auto;
+                width: 300px;
+            }
+            #flexItem2
+            {
+                flex: 0 3 auto;
+                width: 600px;
+            }
+            #flexItem1, #ref1
+            {
+                background-color: blue;
+            }
+            #flexItem2, #ref2
+            {
+                background-color: #ffa500;
+            }
+            #ref1, #ref2
+            {
+                display: inline-block;
+                width: 150px;
+            }
+        </style>
+    </head>
+    <body>
+        <span>Test passes if there is a single blue rectangle on the left, a single orange rectangle directly to its right, and there is no red visible on the page.</span>
+        <div id="flexbox">
+            <div id="flexItem1"></div>
+            <div id="flexItem2"></div>
+        </div>
+        <div id="ref1"></div><div id="ref2"></div>
+    
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001.html
new file mode 100644
index 0000000..a260857
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-001.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - positive number</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set positive number, the actual value of test element size is same as the positive number" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    background-color: green;
+    height: 100px;
+  }
+  #test {
+    flex-basis: 60px;
+  }
+  #ref {
+    width: 40px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+    <div id="ref"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002.html
new file mode 100644
index 0000000..c711e1a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-002.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - positive number</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property specified correct value, the actual value of test element size is same as to the value of 'flex-basis' property, and the 'width' property is invalid." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    height: 100px;
+  }
+  #test {
+    flex-basis: 60px;
+    width: 80px;
+  }
+  #ref {
+    background-color: green;
+    width: 40px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 60px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+    <div id="ref"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003.html
new file mode 100644
index 0000000..b4bd554
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-003.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - negative number(width not specified)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set negative number, the tested element is not shown when width not set either." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    height: 100px;
+  }
+  #test {
+    flex-basis: -50px;
+  }
+  #ref {
+    background-color: green;
+    width: 50px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-left: 50px;
+    margin-top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+    <div id="ref"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004.html
new file mode 100644
index 0000000..c22b4c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-004.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - negative number(width specified)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set negative number, the actual width of tested element is same as the value of 'width' property specified." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    background-color: green;
+    height: 100px;
+  }
+  #test {
+    flex-basis: -50px;
+    width: 30px;
+  }
+  #ref {
+    width: 50px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-left: 80px;
+    margin-top: -100px;
+    width: 20px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+    <div id="ref"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005.html
new file mode 100644
index 0000000..bbfb2be
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-005.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - 0</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set '0', the actual width of tested element is same as 0." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: green;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #test {
+    background-color: red;
+    flex-basis: 0;
+    height: 100px;
+    width: 100px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006.html
new file mode 100644
index 0000000..22cb901
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-006.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - 0%</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set '0%', the actual width of tested element is same as 0." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: green;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #test {
+    background-color: red;
+    flex-basis: 0%;
+    height: 100px;
+    width: 100px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007.html
new file mode 100644
index 0000000..4d13219
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-007.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - auto</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set 'auto', the actual width of tested element same as the value which specified by width property." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    background-color: green;
+    height: 100px;
+  }
+  #ref {
+    width: 50px;
+  }
+  #test {
+    flex-basis: auto;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test"></div>
+    <div id="ref"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008.html
new file mode 100644
index 0000000..7fc0ec6
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-008.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-basis - 50%</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Intel">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help" title="7.3.3. The 'flex-basis' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-basis' property set positive percentage, the actual width of tested element same as the percentage of flex container size." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div{
+    background-color: green;
+    height: 100px;
+  }
+  #ref {
+    width: 40px;
+  }
+  #test {
+    flex-basis: 60%;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="ref"></div>
+    <div id="test"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010.html
new file mode 100644
index 0000000..1931633
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-basis-010.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: Indefinite % flex-basis should cause height to be ignored</title>
+<link href="https://www.google.com" rel="author" title="Google LLC">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    width: 100px;
+    flex-direction: column;
+  }
+  #item {
+    flex: 0 0 0%;
+    height: 500px;
+    background-color: red;
+  }
+  #child {
+    width: 100px; /* Cobalt does not support sizing from intrinsic ratio */
+    height: 100px;
+    background-color: green;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="item">
+      <div id="child"></div>
+    </div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001-expected.png
new file mode 100644
index 0000000..5c2039d
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001.html
new file mode 100644
index 0000000..5229a83
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-001.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html>
+ <head>
+  <title>CSS Test: Flex-grow Property of Block-level Flex Items</title>
+  <link rel="author" title="Hanrui Gao" href="mailto:hanrui.gao@gmail.com">
+  <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property">
+  <link rel="match" href="reference/flex-grow-001-ref.htm">
+  <meta name="flags" content="">
+  <meta name="assert" content="'flex-grow' property specifies the flex grow factor, which determines how much the flex item will grow relative to the rest of the flex items in the flex container when positive free space is distributed.">
+  <style type="text/css">
+   body {
+     margin: 0px;
+     background-color: white;
+     font-family: Roboto;
+     font-size: 16px;
+   }
+   #container {
+     width: 240px;
+     height: 60px;
+     border: 1px solid #000;
+     display: flex;
+   }
+   #container > div {
+     width: 30px;
+     height: 100%;
+   }
+   #child_1 {
+     flex-grow: 0;
+     background-color: green;
+   }
+   #child_2 {
+     flex-grow: 1;
+     background-color: blue;
+   }
+   #child_3 {
+     flex-grow: 2;
+     background-color: gray;
+   }
+  </style>
+ </head>
+ <body>
+   <div id="container">
+      <div id="child_1"></div>
+      <div id="child_2"></div>
+      <div id="child_3"></div>
+   </div>
+ </body>
+</html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002.html
new file mode 100644
index 0000000..f80a198
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-002.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - 0(initial value)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-grow' property initial value is '0', the flex item will keep the width when 'flex-grow' set '0'" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 20px;
+  }
+  #test1 {
+    background-color: green;
+    flex-grow: 1;
+  }
+  #test2 {
+    background-color: green;
+    flex-grow: 0;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-left: 80px;
+    margin-top: -100px;
+    width: 20px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+    <div id="test3"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003.html
new file mode 100644
index 0000000..dec50a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-003.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - negative number</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-grow' property set negative number, the flex item will not grow." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: green;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    background-color: red;
+    height: 100px;
+  }
+  #test1 {
+    flex-grow: -2;
+    width: 25px;
+  }
+  #test2 {
+    flex-grow: -3;
+    width: 25px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    position: relative;
+    top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004.html
new file mode 100644
index 0000000..5dc73ab
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-004.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - (invalid when no space distributed)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-grow' property is invalid when the flex container has no space distributed." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+  }
+  #test1 {
+    flex-grow: 3;
+    width: 50px;
+  }
+  #test2 {
+    background-color: green;
+    flex-grow: 2;
+    width: 50px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    position: relative;
+    top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005.html
new file mode 100644
index 0000000..5777b89
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-005.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - (invalid when applied to flex container)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The 'flex-grow' property is invalid when the property applied to flex container." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: green;
+    display: flex;
+    flex-grow: 2;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    background-color: red;
+    height: 100px;
+    width: 25px;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    position: relative;
+    top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div></div>
+    <div></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006.html
new file mode 100644
index 0000000..27f467e
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-006.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - positive number(fill all space)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="Test checks that all space of flex container will be filled when there is only one flex item and 'flex-grow' set any positive number." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    background-color: red;
+    display: flex;
+    height: 50px;
+    width: 100px;
+  }
+  .container > div {
+    background-color: green;
+    height: 50px;
+    width: 25px;
+  }
+  #test1 {
+    flex-grow: 1.5;
+  }
+  #test2 {
+    flex-grow: 2;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div class="container">
+    <div id="test1"></div>
+  </div>
+  <div class="container">
+    <div id="test2"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007.html
new file mode 100644
index 0000000..7ad8bd2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-grow-007.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-grow - less than one</title>
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-grow-property" rel="help" title="7.3.1. The 'flex-grow' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="Test checks that remaining free space is calculated from 'flex-grow' set to positive number less than one." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    background: red;
+    height: 50px;
+    width: 100px;
+  }
+  #test1, #test2 {
+    display: flex;
+    width: 190px;
+  }
+  #test1 > div, #test2 > div {
+    background: green;
+    height: 50px;
+  }
+  #test1 > div {
+    flex-grow: 0.1;
+    width: 90px;
+  }
+  #test2 > div {
+    flex-grow: 0.05;
+    width: 45px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div class="container">
+    <div id="test1">
+      <div></div>
+    </div>
+  </div>
+  <div class="container">
+    <div id="test2">
+      <div></div>
+      <div></div>
+    </div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001.html
new file mode 100644
index 0000000..c3e9400
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-001.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - number(positive)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property set positive number determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 100px;
+  }
+  #test1 {
+    flex-shrink: 2;
+  }
+  #test2 {
+    background-color: green;
+    flex-shrink: 3;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 60px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002.html
new file mode 100644
index 0000000..3886162
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-002.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - number(negative)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property set negative is invalid to shrink flex items when negative free space is distributed" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 100px;
+  }
+  #test1 {
+    flex-shrink: -2;
+  }
+  #test2 {
+    background-color: green;
+    flex-shrink: -3;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003.html
new file mode 100644
index 0000000..74e8efe
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-003.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - 1(initial value)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property initial value is 1" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 100px;
+  }
+  #test2 {
+    background-color: green;
+    flex-shrink: 4;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 80px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004.html
new file mode 100644
index 0000000..7083ada
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-004.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - number(flex container has enough space)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property is invalid when flex container has enough space to load flex items" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    background-color: green;
+    height: 100px;
+    width: 40px;
+  }
+  #test1 {
+    flex-shrink: 2;
+  }
+  #test2 {
+    flex-shrink: 3;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-left: 80px;
+    margin-top: -100px;
+    width: 20px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005.html
new file mode 100644
index 0000000..a344bfc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-005.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - 0</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property set 0 will ignore the flex container" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 50px;
+  }
+  #container div {
+    height: 100px;
+    width: 50px;
+  }
+  #test1 {
+    flex-shrink: 0;
+  }
+  #test2 {
+    background-color: green;
+    flex-shrink: 0;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006.html
new file mode 100644
index 0000000..9a47f04
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-006.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - 0(one of flex-shrinks sets 0, another not)</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex item whose flex-shrink property of set 0 will displayed on the top of all flex items" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 100px;
+  }
+  #test1 {
+    background-color: green;
+    flex-shrink: 0;
+  }
+  #test2 {
+    background-color: yellow;
+    flex-shrink: 0.1;
+  }
+  #test3 {
+    background-color: blue;
+    flex-shrink: 2;
+  }
+  #test2 {
+    background-color: black;
+    flex-shrink: 3;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+    <div id="test3"></div>
+    <div id="test4"></div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007.html
new file mode 100644
index 0000000..4057f82
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-007.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - applied to flex container</title>
+<link href="http://www.intel.com" rel="author" title="Intel">
+<link href="mailto:shiyoux.tan@intel.com" rel="author" title="Shiyou Tan">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.2. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="The flex-shrink property applied to flex container is invalid, all flex items will use the default value 1" name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  #container {
+    background-color: red;
+    display: flex;
+    flex-shrink: 2;
+    height: 100px;
+    width: 100px;
+  }
+  #container div {
+    height: 100px;
+    width: 100px;
+  }
+  #test2 {
+    background-color: green;
+  }
+  #cover {
+    background-color: green;
+    height: 100px;
+    margin-top: -100px;
+    width: 50px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div id="container">
+    <div id="test1"></div>
+    <div id="test2"></div>
+  </div>
+  <div id="cover"></div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008-expected.png
new file mode 100644
index 0000000..a3672fc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008.html
new file mode 100644
index 0000000..19b88e0
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flex-shrink-008.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><meta charset="utf-8">
+<title>CSS Flexbox Test: flex-shrink - less than one</title>
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property" rel="help" title="7.3.1. The 'flex-shrink' property">
+<link href="reference/ref-filled-green-100px-square.htm" rel="match">
+<meta content="" name="flags">
+<meta content="Test checks that remaining free space is calculated from 'flex-shrink' set to positive number less than one." name="assert">
+<style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    background: red;
+    height: 50px;
+    width: 100px;
+  }
+  #test1, #test2 {
+    display: flex;
+    width: 50px;
+  }
+  #test1 > div, #test2 > div {
+    background: green;
+    height: 50px;
+  }
+  #test1 > div {
+    flex-shrink: 0.9;
+    width: 550px;
+  }
+  #test2 > div {
+    flex-shrink: 0.25;
+    width: 75px;
+  }
+</style>
+</head><body>
+  <span>Test passes if there is a filled green square and no red.</span>
+  <div class="container">
+    <div id="test1">
+      <div></div>
+    </div>
+  </div>
+  <div class="container">
+    <div id="test2">
+      <div></div>
+      <div></div>
+    </div>
+  </div>
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a-expected.png
new file mode 100644
index 0000000..44c98e6
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a.html
new file mode 100644
index 0000000..ae12316
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001a.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head>
+  <title>
+    CSS Test: Testing "flex-basis: content" in a row-oriented flex container
+  </title>
+  <meta charset="utf-8">
+  <link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert">
+  <link href="https://www.w3.org/TR/css-flexbox-1/#propdef-flex-basis" rel="help">
+  <link href="reference/flexbox-flex-basis-content-001-ref.htm" rel="match">
+  <style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 24px;
+  }
+  .container {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    border: 2px solid purple;
+    padding: 2px;
+    margin-bottom: 2em;
+    height: 50px;
+    width: 200px;
+  }
+
+  .container > * {
+    /* All flex items have "flex-basis: content" (and zero flex-shrink and
+       min-main-size, to avoid any influence from those). */
+    flex-basis: content;
+    flex-shrink: 0;
+    min-width: 0;
+    border: 2px solid #008080;
+  }
+
+  .smallText { font: 10px Roboto; }
+  .bigText   { font: 20px Roboto; }
+  .spacerChild::before {
+    content: '';
+    display: block;
+    background: #A52A2A;
+    height: 10px;
+    width: 10px;
+  }
+  .justPadding {
+    /* Empty div with 5px padding on each side */
+    padding: 5px;
+    background: #00FFFF;
+  }
+  #canvas { background: fuchsia }
+  </style>
+</head>
+<body>
+<!-- Flex items have unspecified size properties: -->
+<div class="container">
+  <div class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div class="bigText">&#x2588;</div>
+  <div class="spacerChild"></div>
+  <div class="justPadding"></div>
+  <div id="canvas" style="width: 20px"></div>
+</div>
+
+<!-- Various specified main-size values (should be ignored): -->
+<div class="container">
+  <div style="width: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="width: 40px" class="bigText">&#x2588;</div>
+  <div style="width: 20px" class="spacerChild"></div>
+  <div style="width: 10px" class="justPadding"></div>
+  <div id="canvas" style="width: 8px"></div>
+</div>
+
+<!-- Various specified cross-size values (should be honored): -->
+<div class="container">
+  <div style="height: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="height: 40px" class="bigText">&#x2588;</div>
+  <div style="height: 20px" class="spacerChild"></div>
+  <div style="height: 10px" class="justPadding"></div>
+  <div id="canvas" style="height: 8px"></div>
+</div>
+
+
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b-expected.png
new file mode 100644
index 0000000..4acefcb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b.html
new file mode 100644
index 0000000..efd948f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-001b.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head>
+  <title>
+    CSS Test: Testing "flex-basis: content" (set via the "flex" shorthand)
+    in a row-oriented flex container.
+  </title>
+  <meta charset="utf-8">
+  <link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert">
+  <link href="https://www.w3.org/TR/css-flexbox-1/#propdef-flex-basis" rel="help">
+  <link href="reference/flexbox-flex-basis-content-001-ref.htm" rel="match">
+  <style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    border: 2px solid purple;
+    padding: 2px;
+    margin-bottom: 2em;
+    height: 50px;
+    width: 200px;
+  }
+
+  .container > * {
+    /* All flex items have "flex-basis: content" (and zero flex-shrink and
+       min-main-size, to avoid any influence from those). */
+    flex: 0 0 content;
+    min-width: 0;
+    border: 2px solid #008080;
+  }
+
+  .smallText { font: 10px Roboto; }
+  .bigText   { font: 20px Roboto; }
+  .spacerChild::before {
+    content: '';
+    display: block;
+    background: #A52A2A;
+    height: 10px;
+    width: 10px;
+  }
+  .justPadding {
+    /* Empty div with 5px padding on each side */
+    padding: 5px;
+    background: #00FFFF;
+  }
+  #canvas { background: fuchsia }
+  </style>
+</head>
+<body>
+<!-- Flex items have unspecified size properties: -->
+<div class="container">
+  <div class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div class="bigText">&#x2588;</div>
+  <div class="spacerChild"></div>
+  <div class="justPadding"></div>
+  <div id="canvas" style="width: 20px;"></div>
+</div>
+
+<!-- Various specified main-size values (should be ignored): -->
+<div class="container">
+  <div style="width: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="width: 40px" class="bigText">&#x2588;</div>
+  <div style="width: 20px" class="spacerChild"></div>
+  <div style="width: 10px" class="justPadding"></div>
+  <div id="canvas" style="width: 8px"></div>
+</div>
+
+<!-- Various specified cross-size values (should be honored): -->
+<div class="container">
+  <div style="height: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="height: 40px" class="bigText">&#x2588;</div>
+  <div style="height: 20px" class="spacerChild"></div>
+  <div style="height: 10px" class="justPadding"></div>
+  <div id="canvas" style="height: 8px"></div>
+</div>
+
+
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a-expected.png
new file mode 100644
index 0000000..7ec04ca
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a.html
new file mode 100644
index 0000000..8626ce9
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002a.html
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head>
+  <title>
+    CSS Test: Testing "flex-basis: content" in a column-oriented flex container
+  </title>
+  <meta charset="utf-8">
+  <link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert">
+  <link href="https://www.w3.org/TR/css-flexbox-1/#propdef-flex-basis" rel="help">
+  <link href="reference/flexbox-flex-basis-content-002-ref.htm" rel="match">
+  <style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    display: inline-flex;
+    vertical-align: top;
+    flex-direction: column;
+    justify-content: space-between;
+    border: 2px solid purple;
+    padding: 2px;
+    margin-right: 2em;
+    width: 50px;
+    height: 200px;
+  }
+
+  .container > * {
+    /* All flex items have "flex-basis: content" (and zero flex-shrink and
+       min-main-size, to avoid any influence from those). */
+    flex-basis: content;
+    flex-shrink: 0;
+    min-height: 0;
+    border: 2px solid #008080;
+  }
+
+  .smallText { font: 10px Roboto; }
+  .bigText   { font: 20px Roboto; }
+  .spacerChild::before {
+    content: '';
+    display: block;
+    background: #A52A2A;
+    height: 10px;
+    width: 10px;
+  }
+  .justPadding {
+    /* Empty div with 5px padding on each side */
+    padding: 5px;
+    background: #00FFFF;
+  }
+  #canvas { background: fuchsia }
+  </style>
+</head>
+<body>
+<!-- Flex items have unspecified size properties: -->
+<div class="container">
+  <div class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div class="bigText">&#x2588;</div>
+  <div class="spacerChild"></div>
+  <div class="justPadding"></div>
+  <div id="canvas" style="height: 20px;"></div>
+</div>
+
+<!-- Various specified main-size values (should be ignored): -->
+<div class="container">
+  <div style="height: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="height: 40px" class="bigText">&#x2588;</div>
+  <div style="height: 20px" class="spacerChild"></div>
+  <div style="height: 10px" class="justPadding"></div>
+  <div id="canvas" style="height: 8px"></div>
+</div>
+
+<!-- Various specified cross-size values (should be honored): -->
+<div class="container">
+  <div style="width: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="width: 40px" class="bigText">&#x2588;</div>
+  <div style="width: 20px" class="spacerChild"></div>
+  <div style="width: 10px" class="justPadding"></div>
+  <div id="canvas" style="width: 8px"></div>
+</div>
+
+
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b-expected.png
new file mode 100644
index 0000000..7ec04ca
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b.html
new file mode 100644
index 0000000..d2d5caa
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox-flex-basis-content-002b.html
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--><html><head>
+  <title>
+    CSS Test: Testing "flex-basis: content" (set via the "flex" shorthand)
+    in a column-oriented flex container.
+  </title>
+  <meta charset="utf-8">
+  <link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert">
+  <link href="https://www.w3.org/TR/css-flexbox-1/#propdef-flex-basis" rel="help">
+  <link href="reference/flexbox-flex-basis-content-002-ref.htm" rel="match">
+  <style>
+  body {
+    margin: 0px;
+    background-color: white;
+    font-family: Roboto;
+    font-size: 16px;
+  }
+  .container {
+    display: inline-flex;
+    vertical-align: top;
+    flex-direction: column;
+    justify-content: space-between;
+    border: 2px solid purple;
+    padding: 2px;
+    margin-right: 2em;
+    width: 50px;
+    height: 200px;
+  }
+
+  .container > * {
+    /* All flex items have "flex-basis: content" (and zero flex-shrink and
+       min-main-size, to avoid any influence from those). */
+    flex: 0 0 content;
+    min-height: 0;
+    border: 2px solid #008080;
+  }
+
+  .smallText { font: 10px Roboto; }
+  .bigText   { font: 20px Roboto; }
+  .spacerChild::before {
+    content: '';
+    display: block;
+    background: #A52A2A;
+    height: 10px;
+    width: 10px;
+  }
+  .justPadding {
+    /* Empty div with 5px padding on each side */
+    padding: 5px;
+    background: #00FFFF;
+  }
+  #canvas { background: fuchsia }
+  </style>
+</head>
+<body>
+<!-- Flex items have unspecified size properties: -->
+<div class="container">
+  <div class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div class="bigText">&#x2588;</div>
+  <div class="spacerChild"></div>
+  <div class="justPadding"></div>
+  <div id="canvas" style="height: 20px;"></div>
+</div>
+
+<!-- Various specified main-size values (should be ignored): -->
+<div class="container">
+  <div style="height: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="height: 40px" class="bigText">&#x2588;</div>
+  <div style="height: 20px" class="spacerChild"></div>
+  <div style="height: 10px" class="justPadding"></div>
+  <div id="canvas" style="height: 8px"></div>
+</div>
+
+<!-- Various specified cross-size values (should be honored): -->
+<div class="container">
+  <div style="width: 0px" class="smallText">&#x2588;&#x2002;&#x2002;&#x2588;</div>
+  <div style="width: 40px" class="bigText">&#x2588;</div>
+  <div style="width: 20px" class="spacerChild"></div>
+  <div style="width: 10px" class="justPadding"></div>
+  <div id="canvas" style="width: 8px"></div>
+</div>
+
+
+
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless.html
new file mode 100644
index 0000000..13cd33d
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0-unitless.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html><head><title>flexbox | flex: 0 0 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
+
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0.html
new file mode 100644
index 0000000..d925ce1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-expected.png
new file mode 100644
index 0000000..68f4821
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink-expected.png
new file mode 100644
index 0000000..8f80abb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink.html
new file mode 100644
index 0000000..6fd71f1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis.html
new file mode 100644
index 0000000..ff27572
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N-unitless-basis.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 N unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-unitless-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 4;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N.html
new file mode 100644
index 0000000..4282bbb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-expected.png
new file mode 100644
index 0000000..cb5a5d5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink-expected.png
new file mode 100644
index 0000000..ad09585
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink.html
new file mode 100644
index 0000000..653d7fb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent.html
new file mode 100644
index 0000000..cd52187
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink-expected.png
new file mode 100644
index 0000000..14e1f95
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink.html
new file mode 100644
index 0000000..82f3196
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 0 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto.html
new file mode 100644
index 0000000..da3f2cf
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-auto.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html><head><title>flexbox | flex: 0 0 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0.html
new file mode 100644
index 0000000..76216b1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-0.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html><head><title>flexbox | flex: 0 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 79px;
+	display: inline-block;
+
+  flex: 0 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless.html
new file mode 100644
index 0000000..b5a184e
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0.html
new file mode 100644
index 0000000..f384e46
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis.html
new file mode 100644
index 0000000..cfb60db
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-1-unitless-basis.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 1 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-unitless-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 1;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-expected.png
new file mode 100644
index 0000000..68f4821
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink.html
new file mode 100644
index 0000000..fee0867
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis.html
new file mode 100644
index 0000000..ef1642c
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N-unitless-basis.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 N unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-unitless-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 4;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N.html
new file mode 100644
index 0000000..53b2092
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-expected.png
new file mode 100644
index 0000000..cb5a5d5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink.html
new file mode 100644
index 0000000..85de799
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent.html
new file mode 100644
index 0000000..cbbbfdf
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink.html
new file mode 100644
index 0000000..6b5af92
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto.html
new file mode 100644
index 0000000..8394293
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1.html
new file mode 100644
index 0000000..23133be
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-1.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 1</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 1;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless.html
new file mode 100644
index 0000000..ad11723
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0.html
new file mode 100644
index 0000000..5591371
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-expected.png
new file mode 100644
index 0000000..68f4821
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink.html
new file mode 100644
index 0000000..c1f9664
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N.html
new file mode 100644
index 0000000..87a779a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-expected.png
new file mode 100644
index 0000000..cb5a5d5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink.html
new file mode 100644
index 0000000..bdb31b9
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent.html
new file mode 100644
index 0000000..c5ef228
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-expected.png
new file mode 100644
index 0000000..f551ef2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink.html
new file mode 100644
index 0000000..50b8362
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto.html
new file mode 100644
index 0000000..1cad65a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-expected.png
new file mode 100644
index 0000000..70bfb71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N.html
new file mode 100644
index 0000000..8ff465f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-0-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 0 2;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto-expected.png
new file mode 100644
index 0000000..3a40ec6
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto.html
new file mode 100644
index 0000000..9721f85
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-0-auto.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 0 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-initial-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 22em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em;
+	width: 5em;
+	display: inline-block;
+	flex: 0 auto;
+}
+#flex span {
+	flex: 0 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+
+<div id="flex">
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless.html
new file mode 100644
index 0000000..1d91ca7
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0.html
new file mode 100644
index 0000000..1b872f3
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink-expected.png
new file mode 100644
index 0000000..8f80abb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink.html
new file mode 100644
index 0000000..6db4e48
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N.html
new file mode 100644
index 0000000..143a3f8
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink-expected.png
new file mode 100644
index 0000000..ad09585
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink.html
new file mode 100644
index 0000000..16accb5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent.html
new file mode 100644
index 0000000..49f167c
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink-expected.png
new file mode 100644
index 0000000..14e1f95
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink.html
new file mode 100644
index 0000000..3ac1b32
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto.html
new file mode 100644
index 0000000..a47aa92
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0.html
new file mode 100644
index 0000000..5f81201
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless.html
new file mode 100644
index 0000000..d0ca3ad
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0.html
new file mode 100644
index 0000000..36b42cf
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink.html
new file mode 100644
index 0000000..19f6aaf
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N.html
new file mode 100644
index 0000000..a4d66ef
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink.html
new file mode 100644
index 0000000..7767e48
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent.html
new file mode 100644
index 0000000..d418b74
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink.html
new file mode 100644
index 0000000..c450b73
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto.html
new file mode 100644
index 0000000..2042924
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1.html
new file mode 100644
index 0000000..4beb0d0
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-1.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 1</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless.html
new file mode 100644
index 0000000..50222c1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0.html
new file mode 100644
index 0000000..305b009
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink.html
new file mode 100644
index 0000000..d84e167
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N.html
new file mode 100644
index 0000000..0ab4625
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink.html
new file mode 100644
index 0000000..81a4616
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent.html
new file mode 100644
index 0000000..70a627a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink.html
new file mode 100644
index 0000000..ab9b624
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto.html
new file mode 100644
index 0000000..4db4360
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N.html
new file mode 100644
index 0000000..963ac54
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-1-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: 1 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-1-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 2;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless.html
new file mode 100644
index 0000000..3615e92
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0.html
new file mode 100644
index 0000000..2fc964e
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink-expected.png
new file mode 100644
index 0000000..8f80abb
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink.html
new file mode 100644
index 0000000..49535e8
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N.html
new file mode 100644
index 0000000..f92c08f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink-expected.png
new file mode 100644
index 0000000..ad09585
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink.html
new file mode 100644
index 0000000..078e7de
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent.html
new file mode 100644
index 0000000..742276d
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink-expected.png
new file mode 100644
index 0000000..a6e5b45
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink.html
new file mode 100644
index 0000000..367c74f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto.html
new file mode 100644
index 0000000..e828eb1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0.html
new file mode 100644
index 0000000..c7055f9
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-0-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless.html
new file mode 100644
index 0000000..47692f2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0.html
new file mode 100644
index 0000000..908d527
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink.html
new file mode 100644
index 0000000..a465efc
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N.html
new file mode 100644
index 0000000..4ff4338
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink.html
new file mode 100644
index 0000000..2f4aac2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent.html
new file mode 100644
index 0000000..f265c9f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink.html
new file mode 100644
index 0000000..b1104db
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto.html
new file mode 100644
index 0000000..cbdeebd
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1 auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1.html
new file mode 100644
index 0000000..b7b0dd5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-1.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N 1</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-1-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 1;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless.html
new file mode 100644
index 0000000..caa8853
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0-unitless.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N 0 unitless</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 0;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0.html
new file mode 100644
index 0000000..13aa940
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-0.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N 0</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink.html
new file mode 100644
index 0000000..2b1ea71
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N N | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-N-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N.html
new file mode 100644
index 0000000..ef9ee60
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-N-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 4em;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink-expected.png
new file mode 100644
index 0000000..705ab99
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink.html
new file mode 100644
index 0000000..18cc941
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N N% | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-Npercent-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 12em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent.html
new file mode 100644
index 0000000..f34d420
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-Npercent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N N%</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-Npercent-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 20%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink-expected.png
new file mode 100644
index 0000000..83908a1
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink.html
new file mode 100644
index 0000000..e9c477c
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N auto | shrinking</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-auto-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 16em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto.html
new file mode 100644
index 0000000..5632c6e
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-expected.png
new file mode 100644
index 0000000..abe04c5
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N.html
new file mode 100644
index 0000000..af36e0b
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-N-N.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: N N</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-property" rel="help">
+<link href="reference/flexbox_flex-N-N-0-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 4 2;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
\ No newline at end of file
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto-expected.png
new file mode 100644
index 0000000..40a52ad
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto.html
new file mode 100644
index 0000000..45e6326
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-auto.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-common" rel="help">
+<link href="reference/flexbox_flex-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 32em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em;
+	width: 5em;
+	display: inline-block;
+
+	flex: auto;
+}
+#flex span {
+	flex: 1 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+
+<div id="flex">
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-expected.png
new file mode 100644
index 0000000..723273a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink-expected.png
new file mode 100644
index 0000000..16b719f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink.html
new file mode 100644
index 0000000..9f0f5aa
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis-shrink.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex-basis: percentage, flex-shrink: +integer</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-basis-shrink-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 24em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 50%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis.html
new file mode 100644
index 0000000..f662992
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-basis.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex-basis: percentage</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 8em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex-grow: 1;
+	flex-shrink: 0;
+	flex-basis: 100%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2-expected.png
new file mode 100644
index 0000000..e33fba9
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2.html
new file mode 100644
index 0000000..e771372
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-2.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: initial</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-common" rel="help">
+<link href="reference/flexbox_flex-initial-2-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 40em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em;
+	width: 5em;
+	display: inline-block;
+	flex: initial;
+}
+#flex span {
+	flex: 0 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+
+<div id="flex">
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-expected.png
new file mode 100644
index 0000000..3a40ec6
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial.html
new file mode 100644
index 0000000..45a9e9f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-initial.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: initial</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-common" rel="help">
+<link href="reference/flexbox_flex-initial-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 22em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em;
+	width: 5em;
+	display: inline-block;
+	flex: initial;
+}
+#flex span {
+	flex: 0 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+
+<div id="flex">
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-expected.png
new file mode 100644
index 0000000..15e8ee6
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto-expected.png
new file mode 100644
index 0000000..d2247f2
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto.html
new file mode 100644
index 0000000..eaee537
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-auto.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: larger integer, mixed basis, auto</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-natural-mixed-basis-auto-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	font-family: Roboto;
+	background: blue;
+	height: 8em;
+	width: 35em;
+
+	display: flex;
+}
+span {
+	font-family: Roboto;
+	background: white;
+
+	flex: 1 1 auto;
+}
+span:nth-child(1) {
+	flex: 1 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">&#x2588;</span>
+	<span style="background: #FFC0CB;">&#x2588;&#x2588;&#x2588;</span>
+	<span style="background: #ADD8E6;">&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;</span>
+	<span style="background: #808080;">&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;&#x2588;</span>
+</div>
+</body></html>
+
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-expected.png
new file mode 100644
index 0000000..e9d91b0
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis.html
new file mode 100644
index 0000000..29211df
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-mixed-basis.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: larger integer, mixed basis</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-natural-mixed-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	height: 8em;
+	width: 35em;
+
+	display: flex;
+}
+span {
+	background: white;
+	width: 5em;
+
+	flex: 1 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow; flex: 1 1 0%;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis-expected.png
new file mode 100644
index 0000000..90a7936
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis.html
new file mode 100644
index 0000000..bbb8754
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-auto-basis.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: larger integer, auto basis</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-natural-variable-auto-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	border: 1px solid black;
+	height: 8em;
+	width: 32em;
+
+	display: flex;
+}
+span {
+	width: 5em;
+	display: inline-block;
+
+	flex: 1 1 auto;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB; flex: 3 1 auto;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis-expected.png
new file mode 100644
index 0000000..188c761
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis.html
new file mode 100644
index 0000000..6bbbe18
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural-variable-zero-basis.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: larger integer, zero basis</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property" rel="help">
+<link href="reference/flexbox_flex-natural-variable-zero-basis-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	border: 1px solid black;
+	height: 8em;
+	width: 36em;
+
+	display: flex;
+}
+span {
+	width: 6em;
+	display: block;
+
+	flex: 1 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB; flex: 3 1 0%;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural.html
new file mode 100644
index 0000000..6c34222
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-natural.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: larger integer</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-common" rel="help">
+<link href="reference/flexbox_flex-natural-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 800px;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em 0;
+	width: 5em;
+	display: inline-block;
+
+	flex: 2;
+}
+#flex span {
+	flex: 666 1 0%;
+}
+</style>
+
+</head><body><div>
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+
+<div id="flex">
+	<span style="background: yellow;">one</span>
+	<span style="background: #FFC0CB;">two</span>
+	<span style="background: #ADD8E6;">three</span>
+	<span style="background: #808080;">four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none-expected.png
new file mode 100644
index 0000000..0d3fe60
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none.html b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none.html
new file mode 100644
index 0000000..1b48c38
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/csswg_flexbox_flex-none.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+ | Flexbox unit test from csswg.
+ |   http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ -->
+<html><head><title>flexbox | flex: none</title>
+<link href="http://opera.com" rel="author" title="Opera Software">
+<link href="http://www.w3.org/TR/css-flexbox-1/#flex-common" rel="help">
+<link href="reference/flexbox_flex-none-ref.htm" rel="match">
+<style>
+body {
+  margin: 0px;
+  background-color: white;
+  font-family: Roboto;
+  font-size: 16px;
+}
+div {
+	background: blue;
+	margin: 1em 0;
+	border: 1px solid black;
+	height: 8em;
+	width: 32em;
+
+	display: flex;
+}
+span {
+	background: white;
+	margin: 1em;
+	width: 5em;
+	display: inline-block;
+
+	flex: none;
+}
+#flex span {
+	flex: 0 0 auto;
+}
+</style>
+
+</head><body><div>
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+
+<div id="flex">
+	<span>one</span>
+	<span>two</span>
+	<span>three</span>
+	<span>four</span>
+</div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility-expected.png
new file mode 100644
index 0000000..42eecb9
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility.html b/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility.html
new file mode 100644
index 0000000..96f144f
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/flex-items-flexibility.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<!--
+ | Testcase from:
+ | http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/chapter-7.htm
+ | Test: flex-items-flexibility
+ | http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/flex-items-flexibility.htm
+ -->
+<html>
+  <head>
+    <title>CSS Flex-basis Test</title>
+    <link href="mailto:zhangcs_423@163.com" rel="author" title="Chunsheng Zhang">
+    <link href="http://www.w3.org/TR/css-flexbox-1/#flexibility" rel="help">
+    <link href="reference/flex-items-flexibility.htm" rel="match">
+    <meta content="flex items flexibility" name="assert">
+    <style type="text/css">
+      body {
+        margin: 0px;
+        background-color: white;
+        font-family: Roboto;
+        font-size: 16px;
+      }
+      #container {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border: 5px solid green;
+        width: 600px;
+        height: 200px;
+        padding: 5px;
+        border-radius: 3px;
+        position: absolute;
+        top: 70px;
+        left: 10px;
+      }
+      div {
+        padding: 10px;
+        width: 30px;
+        height: 40px;
+        text-align: center;
+        flex: 1 0 auto;
+      }
+      #flex {
+        border: 2px dotted blue;
+        background: green;
+        border-radius: 3px;
+        flex: 2 0 auto;
+      }
+      #fail-flag {
+        position: absolute;
+        padding: 10px;
+        top: 150px;
+        left: 183px;
+        width: 254px;
+        height: 40px;
+        background: red;
+      }
+    </style>
+  </head>
+  <body>
+    <p>This case tests that flex items flexibility</p>
+    <p>The test passes if there is no red</p>
+    <div id="fail-flag"></div>
+    <section id="container">
+      <div></div>
+      <div id="flex"></div>
+      <div></div>
+    </section>
+  </body>
+</html>
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/layout_tests.txt b/src/cobalt/layout_tests/testdata/css3-flexbox/layout_tests.txt
index 0249f80..c8a34e8 100644
--- a/src/cobalt/layout_tests/testdata/css3-flexbox/layout_tests.txt
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/layout_tests.txt
@@ -5,3 +5,133 @@
 combined-shrinking-and-justify-content
 combined-with-baselines-percentages
 content-based-minimum-size
+csswg_flex-001
+csswg_flex-002
+csswg_flex-003
+csswg_flex-004
+csswg_flex-basis-001
+csswg_flex-basis-002
+csswg_flex-basis-003
+csswg_flex-basis-004
+csswg_flex-basis-005
+csswg_flex-basis-006
+csswg_flex-basis-007
+csswg_flex-basis-008
+# Disabled edge case. csswg_flex-basis-010
+csswg_flexbox_flex-0-0
+csswg_flexbox_flex-0-0-0
+csswg_flexbox_flex-0-0-0-unitless
+csswg_flexbox_flex-0-0-auto
+csswg_flexbox_flex-0-0-auto-shrink
+csswg_flexbox_flex-0-0-N
+csswg_flexbox_flex-0-0-Npercent
+csswg_flexbox_flex-0-0-Npercent-shrink
+csswg_flexbox_flex-0-0-N-shrink
+csswg_flexbox_flex-0-0-N-unitless-basis
+csswg_flexbox_flex-0-1
+csswg_flexbox_flex-0-1-0
+csswg_flexbox_flex-0-1-0-unitless
+csswg_flexbox_flex-0-1-1-unitless-basis
+csswg_flexbox_flex-0-1-auto
+csswg_flexbox_flex-0-1-auto-shrink
+csswg_flexbox_flex-0-1-N
+csswg_flexbox_flex-0-1-Npercent
+csswg_flexbox_flex-0-1-Npercent-shrink
+csswg_flexbox_flex-0-1-N-shrink
+csswg_flexbox_flex-0-1-N-unitless-basis
+csswg_flexbox_flex-0-auto
+csswg_flexbox_flex-0-N
+csswg_flexbox_flex-0-N-0
+csswg_flexbox_flex-0-N-0-unitless
+csswg_flexbox_flex-0-N-auto
+csswg_flexbox_flex-0-N-auto-shrink
+csswg_flexbox_flex-0-N-N
+csswg_flexbox_flex-0-N-Npercent
+csswg_flexbox_flex-0-N-Npercent-shrink
+csswg_flexbox_flex-0-N-N-shrink
+csswg_flexbox_flex-1-0
+csswg_flexbox_flex-1-0-0
+csswg_flexbox_flex-1-0-0-unitless
+csswg_flexbox_flex-1-0-auto
+csswg_flexbox_flex-1-0-auto-shrink
+csswg_flexbox_flex-1-0-N
+csswg_flexbox_flex-1-0-Npercent
+csswg_flexbox_flex-1-0-Npercent-shrink
+csswg_flexbox_flex-1-0-N-shrink
+csswg_flexbox_flex-1-1
+csswg_flexbox_flex-1-1-0
+csswg_flexbox_flex-1-1-0-unitless
+csswg_flexbox_flex-1-1-auto
+csswg_flexbox_flex-1-1-auto-shrink
+csswg_flexbox_flex-1-1-N
+csswg_flexbox_flex-1-1-Npercent
+csswg_flexbox_flex-1-1-Npercent-shrink
+csswg_flexbox_flex-1-1-N-shrink
+csswg_flexbox_flex-1-N
+csswg_flexbox_flex-1-N-0
+csswg_flexbox_flex-1-N-0-unitless
+csswg_flexbox_flex-1-N-auto
+csswg_flexbox_flex-1-N-auto-shrink
+csswg_flexbox_flex-1-N-N
+csswg_flexbox_flex-1-N-Npercent
+csswg_flexbox_flex-1-N-Npercent-shrink
+csswg_flexbox_flex-1-N-N-shrink
+csswg_flexbox_flex-auto
+csswg_flexbox_flex-basis
+csswg_flexbox-flex-basis-content-001a
+csswg_flexbox-flex-basis-content-001b
+csswg_flexbox-flex-basis-content-002a
+csswg_flexbox-flex-basis-content-002b
+csswg_flexbox_flex-basis-shrink
+csswg_flexbox_flex-initial
+csswg_flexbox_flex-initial-2
+csswg_flexbox_flex-N-0
+csswg_flexbox_flex-N-0-0
+csswg_flexbox_flex-N-0-0-unitless
+csswg_flexbox_flex-N-0-auto
+csswg_flexbox_flex-N-0-auto-shrink
+csswg_flexbox_flex-N-0-N
+csswg_flexbox_flex-N-0-Npercent
+csswg_flexbox_flex-N-0-Npercent-shrink
+csswg_flexbox_flex-N-0-N-shrink
+csswg_flexbox_flex-N-1
+csswg_flexbox_flex-N-1-0
+csswg_flexbox_flex-N-1-0-unitless
+csswg_flexbox_flex-N-1-auto
+csswg_flexbox_flex-N-1-auto-shrink
+csswg_flexbox_flex-N-1-N
+csswg_flexbox_flex-N-1-Npercent
+csswg_flexbox_flex-N-1-Npercent-shrink
+csswg_flexbox_flex-N-1-N-shrink
+csswg_flexbox_flex-natural
+csswg_flexbox_flex-natural-mixed-basis
+csswg_flexbox_flex-natural-mixed-basis-auto
+csswg_flexbox_flex-natural-variable-auto-basis
+csswg_flexbox_flex-natural-variable-zero-basis
+csswg_flexbox_flex-N-N
+csswg_flexbox_flex-N-N-0
+csswg_flexbox_flex-N-N-0-unitless
+csswg_flexbox_flex-N-N-auto
+csswg_flexbox_flex-N-N-auto-shrink
+csswg_flexbox_flex-N-N-N
+csswg_flexbox_flex-N-N-Npercent
+csswg_flexbox_flex-N-N-Npercent-shrink
+csswg_flexbox_flex-N-N-N-shrink
+csswg_flexbox_flex-none
+csswg_flex-grow-001
+csswg_flex-grow-002
+csswg_flex-grow-003
+csswg_flex-grow-004
+csswg_flex-grow-005
+csswg_flex-grow-006
+csswg_flex-grow-007
+csswg_flex-shrink-001
+csswg_flex-shrink-002
+csswg_flex-shrink-003
+csswg_flex-shrink-004
+csswg_flex-shrink-005
+csswg_flex-shrink-006
+csswg_flex-shrink-007
+csswg_flex-shrink-008
+flex-items-flexibility
+positioned-containers
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers-expected.png b/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers-expected.png
new file mode 100644
index 0000000..c6b3339
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers-expected.png
Binary files differ
diff --git a/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers.html b/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers.html
new file mode 100644
index 0000000..456dafa
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/css3-flexbox/positioned-containers.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+ | Test flexbox containers with absolute positioning.
+ -->
+<html><head>
+    <style type="text/css">
+      body {
+        margin: 0px;
+        background-color: white;
+        font-family: Roboto;
+        font-size: 16px;
+      }
+      .container {
+        display: flex;
+        justify-content: flex-start;
+        align-items: flex-start;
+        border: 5px solid green;
+        width: 40px;
+        height: 50px;
+        padding: 4%;
+        top: 30px;
+        left: 20px;
+        margin: 1%;
+      }
+      .column {
+        flex-direction: column;
+      }
+      .absolute {
+        position: absolute;
+      }
+      .fixed {
+        position: fixed;
+      }
+      .relative {
+        position: relative;
+      }
+      .static {
+        position: static;
+      }
+      .container > div {
+        padding: 5px;
+        width: 5px;
+        height: 20px;
+        text-align: center;
+        border: 2px solid blue;
+        background: green;
+        flex: 1 0 auto;
+      }
+      .column > div {
+        background: #80ff80;
+      }
+      .containingblock {
+        display: inline-block;
+        position: relative;
+        width: 80px;
+        height: 190px;
+        background-color: yellow;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="containingblock">
+      <span class="relative container">
+        <div>AA</div>
+      </span>
+    </div>
+    <div class="containingblock">
+      <span class="static container">
+        <div>BB</div>
+      </span>
+    </div>
+    <div class="containingblock">
+      <span class="absolute container">
+        <div>CC</div>
+      </span>
+      <span class="fixed container">
+        <div>DD</div>
+      </span>
+    </div>
+    <div class="containingblock">
+      <span class="relative column container">
+        <div>a</div>
+      </span>
+    </div>
+    <div class="containingblock">
+      <span class="static column container">
+        <div>b</div>
+      </span>
+    </div>
+    <div class="containingblock">
+      <span class="absolute column container">
+        <div>c</div>
+      </span>
+      <span class="fixed column container">
+        <div>d</div>
+      </span>
+    </div>
+</body></html>
diff --git a/src/cobalt/layout_tests/testdata/web-platform-tests/WebIDL/web_platform_tests.txt b/src/cobalt/layout_tests/testdata/web-platform-tests/WebIDL/web_platform_tests.txt
new file mode 100644
index 0000000..dc6f18a
--- /dev/null
+++ b/src/cobalt/layout_tests/testdata/web-platform-tests/WebIDL/web_platform_tests.txt
@@ -0,0 +1,8 @@
+# DOMException
+ecmascript-binding/es-exceptions/DOMException-constants.any.html,PASS
+# Fails because Cobalt IDL type 'exception' is enumerable.
+ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.html,DISABLE
+ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html,PASS
+ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html,PASS
+# Fails because iframes are not supported.
+ecmascript-binding/es-exceptions/exceptions.html,DISABLE
diff --git a/src/cobalt/layout_tests/testdata/web-platform-tests/dom/web_platform_tests.txt b/src/cobalt/layout_tests/testdata/web-platform-tests/dom/web_platform_tests.txt
index 01f0c75..1682272 100644
--- a/src/cobalt/layout_tests/testdata/web-platform-tests/dom/web_platform_tests.txt
+++ b/src/cobalt/layout_tests/testdata/web-platform-tests/dom/web_platform_tests.txt
@@ -1,3 +1,6 @@
+# AbortController and AbortSignal
+abort/event.any.html,PASS
+
 # MutationObserver tests
 
 # Disabled, until test driver executes fully without Javascript errors
diff --git a/src/cobalt/layout_tests/web_platform_tests.cc b/src/cobalt/layout_tests/web_platform_tests.cc
index 3ae6e78..82f0734 100644
--- a/src/cobalt/layout_tests/web_platform_tests.cc
+++ b/src/cobalt/layout_tests/web_platform_tests.cc
@@ -297,9 +297,8 @@
 }
 
 ::testing::AssertionResult CheckHarnessResult(const char* /* expectation_str */,
-                                              const char* /* results_str */,
-                                              WebPlatformTestInfo::State expect_status,
-                                              const HarnessResult& result) {
+    const char* /* results_str */, WebPlatformTestInfo::State expect_status,
+    const HarnessResult& result) {
   if ((expect_status == WebPlatformTestInfo::State::kPass) &&
       (result.status != kTestsOk)) {
     return ::testing::AssertionFailure()
@@ -423,6 +422,10 @@
                             "streams", "'ReadableStream' in this")),
                         GetTestName());
 
+INSTANTIATE_TEST_CASE_P(webidl, WebPlatformTest,
+    ::testing::ValuesIn(EnumerateWebPlatformTests("WebIDL")),
+    GetTestName());
+
 #endif  // !defined(COBALT_WIN)
 
 }  // namespace layout_tests
diff --git a/src/cobalt/loader/image/image_encoder.cc b/src/cobalt/loader/image/image_encoder.cc
index 7c4ed21..6cd3787 100644
--- a/src/cobalt/loader/image/image_encoder.cc
+++ b/src/cobalt/loader/image/image_encoder.cc
@@ -43,12 +43,16 @@
           kPitchSizeInBytes, &num_bytes);
       break;
     }
+
+#if !defined(COBALT_BUILD_TYPE_GOLD)
     case ImageFormat::kJPEG: {
       compressed_data = renderer::test::jpeg_utils::EncodeRGBAToBuffer(
           image_data, dimensions.width(), dimensions.height(),
           kPitchSizeInBytes, &num_bytes);
       break;
     }
+#endif
+
     case ImageFormat::kWEBP:
       NOTIMPLEMENTED();
       return nullptr;
diff --git a/src/cobalt/loader/image/image_encoder.h b/src/cobalt/loader/image/image_encoder.h
index 91ee6d8..cf12a20 100644
--- a/src/cobalt/loader/image/image_encoder.h
+++ b/src/cobalt/loader/image/image_encoder.h
@@ -29,7 +29,13 @@
 class EncodedStaticImage : public Image {
  public:
   enum class ImageFormat {
+// kJPEG uses jpeg_utils, and jpeg_utils pulls in libjpeg-turbo as an additional
+// dependency, which increases the size of the cobalt binary. Because jpeg_utils
+// is only used for screencasting, which is only needed for non-gold builds, we
+// can disable kJPEG for gold builds.
+#if !defined(COBALT_BUILD_TYPE_GOLD)
     kJPEG,
+#endif
     kPNG,
     kWEBP,
   };
diff --git a/src/cobalt/media_capture/media_recorder.cc b/src/cobalt/media_capture/media_recorder.cc
index e9f90cc..77455bf 100644
--- a/src/cobalt/media_capture/media_recorder.cc
+++ b/src/cobalt/media_capture/media_recorder.cc
@@ -196,12 +196,16 @@
   // Add some padding to the end of the buffer to account for jitter in
   // scheduling, etc.
   // This allows us to potentially avoid unnecessary resizing.
-  base::TimeDelta recommended_time_slice =
-      timeslice_ +
-      base::TimeDelta::FromMilliseconds(kSchedulingLatencyBufferMilliseconds);
-  int64 buffer_size_hint =
-      GetRecommendedBufferSizeInBytes(recommended_time_slice, bits_per_second);
-  buffer_.reserve(static_cast<size_t>(buffer_size_hint));
+  // If the timeslice is using the default maximum long value, do not reserve
+  // space for buffer as we don't know how much is needed.
+  if (!timeslice_unspecified_) {
+    base::TimeDelta recommended_time_slice =
+        timeslice_ +
+        base::TimeDelta::FromMilliseconds(kSchedulingLatencyBufferMilliseconds);
+    int64 buffer_size_hint = GetRecommendedBufferSizeInBytes(
+        recommended_time_slice, bits_per_second);
+    buffer_.reserve(static_cast<size_t>(buffer_size_hint));
+  }
 }
 
 void MediaRecorder::OnReadyStateChanged(
@@ -274,6 +278,7 @@
   WriteData(std::move(empty), true, now);
 
   timeslice_ = base::TimeDelta::FromSeconds(0);
+  timeslice_unspecified_ = false;
   DispatchEvent(new dom::Event(base::Tokens::stop()));
 }
 
diff --git a/src/cobalt/media_capture/media_recorder.h b/src/cobalt/media_capture/media_recorder.h
index 4e761c5..a7b1c9d 100644
--- a/src/cobalt/media_capture/media_recorder.h
+++ b/src/cobalt/media_capture/media_recorder.h
@@ -68,6 +68,7 @@
   void Start(int32 timeslice, script::ExceptionState* exception_state);
 
   void Start(script::ExceptionState* exception_state) {
+    timeslice_unspecified_ = true;
     Start(kint32max, exception_state);
   }
 
@@ -162,6 +163,8 @@
 
   base::WeakPtrFactory<MediaRecorder> weak_ptr_factory_;
   base::WeakPtr<MediaRecorder> weak_this_;
+
+  bool timeslice_unspecified_ = false;
 };
 
 }  // namespace media_capture
diff --git a/src/cobalt/media_stream/microphone_audio_source.cc b/src/cobalt/media_stream/microphone_audio_source.cc
index 59bc3e8..f54e857 100644
--- a/src/cobalt/media_stream/microphone_audio_source.cc
+++ b/src/cobalt/media_stream/microphone_audio_source.cc
@@ -80,7 +80,9 @@
     // Furthermore, it is an error to destruct the microphone manager
     // without stopping it, so these callbacks are not to be called
     // during the destruction of the object.
-    : javascript_message_loop_(base::MessageLoop::current()->task_runner()),
+    : javascript_thread_task_runner_(
+          base::MessageLoop::current()->task_runner()),
+      ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
       successful_open_callback_(successful_open),
       completion_callback_(completion),
       error_callback_(error),
@@ -103,9 +105,11 @@
 }
 
 void MicrophoneAudioSource::OnDataCompletion() {
-  if (javascript_message_loop_ != base::MessageLoop::current()->task_runner()) {
-    javascript_message_loop_->PostTask(
-        FROM_HERE, base::Bind(&MicrophoneAudioSource::OnDataCompletion, this));
+  if (javascript_thread_task_runner_ !=
+      base::MessageLoop::current()->task_runner()) {
+    javascript_thread_task_runner_->PostTask(
+        FROM_HERE, base::Bind(&MicrophoneAudioSource::OnDataCompletion,
+                              weak_ptr_factory_.GetWeakPtr()));
     return;
   }
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -118,9 +122,11 @@
 }
 
 void MicrophoneAudioSource::OnMicrophoneOpen() {
-  if (javascript_message_loop_ != base::MessageLoop::current()->task_runner()) {
-    javascript_message_loop_->PostTask(
-        FROM_HERE, base::Bind(&MicrophoneAudioSource::OnMicrophoneOpen, this));
+  if (javascript_thread_task_runner_ !=
+      base::MessageLoop::current()->task_runner()) {
+    javascript_thread_task_runner_->PostTask(
+        FROM_HERE, base::Bind(&MicrophoneAudioSource::OnMicrophoneOpen,
+                              weak_ptr_factory_.GetWeakPtr()));
     return;
   }
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -132,10 +138,12 @@
 void MicrophoneAudioSource::OnMicrophoneError(
     speech::MicrophoneManager::MicrophoneError error,
     std::string error_message) {
-  if (javascript_message_loop_ != base::MessageLoop::current()->task_runner()) {
-    javascript_message_loop_->PostTask(
-        FROM_HERE, base::Bind(&MicrophoneAudioSource::OnMicrophoneError, this,
-                              error, error_message));
+  if (javascript_thread_task_runner_ !=
+      base::MessageLoop::current()->task_runner()) {
+    javascript_thread_task_runner_->PostTask(
+        FROM_HERE,
+        base::Bind(&MicrophoneAudioSource::OnMicrophoneError,
+                   weak_ptr_factory_.GetWeakPtr(), error, error_message));
     return;
   }
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git a/src/cobalt/media_stream/microphone_audio_source.h b/src/cobalt/media_stream/microphone_audio_source.h
index 08a44f5..d3049d7 100644
--- a/src/cobalt/media_stream/microphone_audio_source.h
+++ b/src/cobalt/media_stream/microphone_audio_source.h
@@ -77,7 +77,9 @@
   void OnMicrophoneError(speech::MicrophoneManager::MicrophoneError error,
                          std::string error_message);
 
-  scoped_refptr<base::SingleThreadTaskRunner> javascript_message_loop_;
+  scoped_refptr<base::SingleThreadTaskRunner> javascript_thread_task_runner_;
+
+  base::WeakPtrFactory<MicrophoneAudioSource> weak_ptr_factory_;
 
   // These are passed into |microphone_manager_| below, so they must be
   // defined before it.
diff --git a/src/cobalt/network/url_request_context.cc b/src/cobalt/network/url_request_context.cc
index 4cfb2c8..7b532ae 100644
--- a/src/cobalt/network/url_request_context.cc
+++ b/src/cobalt/network/url_request_context.cc
@@ -124,6 +124,7 @@
 #if defined(COBALT_ENABLE_QUIC)
   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
   params.enable_quic = !command_line->HasSwitch(switches::kDisableQuic);
+  params.use_quic_for_unknown_origins = params.enable_quic;
 #endif
 #if defined(ENABLE_IGNORE_CERTIFICATE_ERRORS)
   params.ignore_certificate_errors = ignore_certificate_errors;
diff --git a/src/net/cert/test_root_certs_unittest.cc b/src/net/cert/test_root_certs_unittest.cc
index 0754440..4613690 100644
--- a/src/net/cert/test_root_certs_unittest.cc
+++ b/src/net/cert/test_root_certs_unittest.cc
@@ -112,10 +112,8 @@
   int good_status =
       verify_proc->Verify(test_cert.get(), "127.0.0.1", std::string(), flags,
                           NULL, CertificateList(), &good_verify_result);
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
   EXPECT_THAT(good_status, IsOk());
   EXPECT_EQ(0u, good_verify_result.cert_status);
-#endif
 
   test_roots->Clear();
   EXPECT_TRUE(test_roots->IsEmpty());
diff --git a/src/net/cert_net/cert_net_fetcher_impl_unittest.cc b/src/net/cert_net/cert_net_fetcher_impl_unittest.cc
index 7dae657..388a8f9 100644
--- a/src/net/cert_net/cert_net_fetcher_impl_unittest.cc
+++ b/src/net/cert_net/cert_net_fetcher_impl_unittest.cc
@@ -520,7 +520,13 @@
 
 // Fetch the same URLs in parallel and verify that only 1 request is made per
 // URL.
+#if defined(STARBOARD)
+// STARBOARD does not use CertNetFetcher at all, but this test fails on some
+// platform.
+TEST_F(CertNetFetcherImplTest, DISABLED_ParallelFetchDuplicates) {
+#else
 TEST_F(CertNetFetcherImplTest, ParallelFetchDuplicates) {
+#endif
   ASSERT_TRUE(test_server_.Start());
 
   CreateFetcher();
@@ -586,7 +592,13 @@
 }
 
 // Start duplicate requests and then cancel all of them.
+#if defined(STARBOARD)
+// STARBOARD does not use CertNetFetcher at all, but this test fails on some
+// platform.
+TEST_F(CertNetFetcherImplTest, DISABLED_CancelAll) {
+#else
 TEST_F(CertNetFetcherImplTest, CancelAll) {
+#endif
   ASSERT_TRUE(test_server_.Start());
 
   CreateFetcher();
diff --git a/src/net/dial/dial_udp_socket_factory.cc b/src/net/dial/dial_udp_socket_factory.cc
index 4f03a74..b991daf 100644
--- a/src/net/dial/dial_udp_socket_factory.cc
+++ b/src/net/dial/dial_udp_socket_factory.cc
@@ -27,8 +27,10 @@
     return NULL;
   }
 
-  if (!sock->AllowAddressReuse()) {
-    LOG(WARNING) << "AllowAddressReuse failed on DIAL UDP socket.";
+  int set_socket_reuse_success = sock->AllowAddressReuse();
+  if (set_socket_reuse_success != OK) {
+    LOG(WARNING) << "AllowAddressReuse failed on DIAL UDP socket with code "
+                 << set_socket_reuse_success;
   }
 
   if (sock->Bind(address) != net::OK) {
diff --git a/src/net/http/http_network_session.cc b/src/net/http/http_network_session.cc
index 0415c27..58cf10f 100644
--- a/src/net/http/http_network_session.cc
+++ b/src/net/http/http_network_session.cc
@@ -114,6 +114,9 @@
 #if defined(COBALT_QUIC46)
       enable_quic_proxies_for_https_urls(false),
 #endif
+#if defined(STARBOARD)
+      use_quic_for_unknown_origins(false),
+#endif
 #if !defined(QUIC_DISABLED_FOR_STARBOARD)
       quic_max_packet_length(quic::kDefaultMaxPacketSize),
 #endif
@@ -558,6 +561,10 @@
 void HttpNetworkSession::ToggleQuic() {
   params_.enable_quic = !params_.enable_quic;
 }
+
+bool HttpNetworkSession::UseQuicForUnknownOrigin() const {
+  return params_.use_quic_for_unknown_origins;
+}
 #endif  // defined(STARBOARD)
 
 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
diff --git a/src/net/http/http_network_session.h b/src/net/http/http_network_session.h
index ded46f4..ff8ce8f 100644
--- a/src/net/http/http_network_session.h
+++ b/src/net/http/http_network_session.h
@@ -149,6 +149,12 @@
     bool enable_quic_proxies_for_https_urls;
 #endif
 
+#if defined(STARBOARD)
+    // If true, request to an origin without recorded alt-svc info will
+    // try to establish both QUIC and TCP connections and use the faster one.
+    bool use_quic_for_unknown_origins;
+#endif
+
     // QUIC runtime configuration options.
 
     // Versions of QUIC which may be used.
@@ -403,6 +409,9 @@
 #if defined(STARBOARD)
   // Toggle QUIC support for new streams.
   void ToggleQuic();
+
+  // Whether to try QUIC connection for origins without alt-svc on record.
+  bool UseQuicForUnknownOrigin() const;
 #endif  // defined(STARBOARD)
 
  private:
diff --git a/src/net/http/http_stream_factory_job_controller.cc b/src/net/http/http_stream_factory_job_controller.cc
index 198d9f3..451d4d5 100644
--- a/src/net/http/http_stream_factory_job_controller.cc
+++ b/src/net/http/http_stream_factory_job_controller.cc
@@ -29,6 +29,10 @@
 
 namespace {
 
+#if defined(STARBOARD)
+const int kDefaultQUICServerPort = 443;
+#endif
+
 // Returns parameters associated with the proxy resolution.
 std::unique_ptr<base::Value> NetLogHttpStreamJobProxyServerResolved(
     const ProxyServer& proxy_server,
@@ -1135,8 +1139,25 @@
       *session_->http_server_properties();
   const AlternativeServiceInfoVector alternative_service_info_vector =
       http_server_properties.GetAlternativeServiceInfos(origin);
+#if defined(STARBOARD)
+  // This block of code suggests QUIC connection for initial requests to a
+  // stranger host. This method is proven to provide performance benefit while
+  // still enabling Cobalt network module to fall back on TCP connection when
+  // QUIC fails or is too slow.
+  if (alternative_service_info_vector.empty() && session_->IsQuicEnabled() &&
+      session_->UseQuicForUnknownOrigin()) {
+    if (origin.port() == kDefaultQUICServerPort) {
+      return AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
+          AlternativeService(net::kProtoQUIC, origin.host(),
+                             kDefaultQUICServerPort),
+          base::Time::Max(), {quic::QUIC_VERSION_46});
+    }
+    return AlternativeServiceInfo();
+  }
+#else
   if (alternative_service_info_vector.empty())
     return AlternativeServiceInfo();
+#endif
 
   bool quic_advertised = false;
   bool quic_all_broken = true;
diff --git a/src/net/net.gyp b/src/net/net.gyp
index c90b5b3..9b5ebf6 100644
--- a/src/net/net.gyp
+++ b/src/net/net.gyp
@@ -18,7 +18,6 @@
         # TODO[johnx]: find out how we can verify local cert issuer and
         # re-enable this test. Consider adding a binary cert for local issuer
         # for debug builds.
-        'STARBOARD_NO_LOCAL_ISSUER',
         'QUIC_TRACE_DISABLED',
         'COBALT_QUIC46',
         'COMMON_CERT_SET_DISABLED_FOR_STARBOARD',
@@ -27,7 +26,6 @@
         'defines': [
           'HTTP_CACHE_DISABLED_FOR_STARBOARD',
           'ENABLE_BUILT_IN_DNS',
-          'STARBOARD_NO_LOCAL_ISSUER',
           'QUIC_TRACE_DISABLED',
           'COBALT_QUIC46',
           'COMMON_CERT_SET_DISABLED_FOR_STARBOARD',
diff --git a/src/net/test/embedded_test_server/embedded_test_server.cc b/src/net/test/embedded_test_server/embedded_test_server.cc
index 490dc46..41aa8d1 100644
--- a/src/net/test/embedded_test_server/embedded_test_server.cc
+++ b/src/net/test/embedded_test_server/embedded_test_server.cc
@@ -178,6 +178,9 @@
   base::Thread::Options thread_options;
   thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
   io_thread_.reset(new base::Thread("EmbeddedTestServer IO Thread"));
+#if defined(STARBOARD)
+  thread_options.stack_size = base::kUnitTestStackSize;
+#endif
   CHECK(io_thread_->StartWithOptions(thread_options));
   CHECK(io_thread_->WaitUntilThreadStarted());
 
diff --git a/src/net/test/embedded_test_server/embedded_test_server_unittest.cc b/src/net/test/embedded_test_server/embedded_test_server_unittest.cc
index ca10a84..236e85a 100644
--- a/src/net/test/embedded_test_server/embedded_test_server_unittest.cc
+++ b/src/net/test/embedded_test_server/embedded_test_server_unittest.cc
@@ -132,6 +132,9 @@
   void SetUp() override {
     base::Thread::Options thread_options;
     thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
+#if defined(STARBOARD)
+    thread_options.stack_size = base::kUnitTestStackSize;
+#endif
     ASSERT_TRUE(io_thread_.StartWithOptions(thread_options));
 
     request_context_getter_ =
@@ -233,7 +236,6 @@
   }
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_P(EmbeddedTestServerTest, RegisterRequestHandler) {
   server_->RegisterRequestHandler(base::BindRepeating(
       &EmbeddedTestServerTest::HandleRequest, base::Unretained(this), "/test",
@@ -310,7 +312,6 @@
   EXPECT_EQ(URLRequestStatus::SUCCESS, fetcher->GetStatus().status());
   EXPECT_EQ(HTTP_NOT_FOUND, fetcher->GetResponseCode());
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 TEST_P(EmbeddedTestServerTest, ConnectionListenerAccept) {
   ASSERT_TRUE(server_->Start());
@@ -331,7 +332,6 @@
   EXPECT_FALSE(connection_listener_.DidReadFromSocket());
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_P(EmbeddedTestServerTest, ConnectionListenerRead) {
   ASSERT_TRUE(server_->Start());
 
@@ -392,7 +392,6 @@
   EXPECT_EQ("No chocolates", GetContentFromFetcher(*fetcher3));
   EXPECT_EQ("text/plain", GetContentTypeFromFetcher(*fetcher3));
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 namespace {
 
@@ -592,7 +591,8 @@
 #if defined(STARBOARD)
   // Some platforms have low default stack size that can't support unit tests.
   ASSERT_TRUE(
-      base::PlatformThread::Create(256 * 1024, &delegate, &thread_handle));
+      base::PlatformThread::Create(base::kUnitTestStackSize, &delegate,
+                                   &thread_handle));
 #else
   ASSERT_TRUE(base::PlatformThread::Create(0, &delegate, &thread_handle));
 #endif
diff --git a/src/net/url_request/url_request_unittest.cc b/src/net/url_request/url_request_unittest.cc
index 7303603..d58d057 100644
--- a/src/net/url_request/url_request_unittest.cc
+++ b/src/net/url_request/url_request_unittest.cc
@@ -3217,7 +3217,6 @@
   }
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(URLRequestTest, SecureCookiePrefixSecure) {
   EmbeddedTestServer https_server(EmbeddedTestServer::TYPE_HTTPS);
   https_server.AddDefaultHandlers(
@@ -3255,7 +3254,6 @@
     EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
   }
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 // Tests that secure cookies can't be set on non-secure origins if strict secure
 // cookies are enabled.
@@ -3301,7 +3299,6 @@
   }
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 // Tests that secure cookies can be set on secure origins even if strict secure
 // cookies are enabled.
 TEST_F(URLRequestTest, StrictSecureCookiesOnSecureOrigin) {
@@ -3341,7 +3338,6 @@
     EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
   }
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 // The parameter is true for same-site and false for cross-site requests.
 class URLRequestTestParameterizedSameSite
@@ -3373,7 +3369,6 @@
                         URLRequestTestParameterizedSameSite,
                         ::testing::Bool());
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_P(URLRequestTestParameterizedSameSite, CookieAgeMetrics) {
   const bool same_site = GetParam();
   const std::string kInitiatingHost = same_site ? kHost_ : kCrossHost_;
@@ -3465,7 +3460,6 @@
     EXPECT_TRUE(d.data_received().find("cookie2=value2") != std::string::npos);
   }
 }
-#endif
 
 // Cookies with secure attribute (no HSTS) --> k1pSecureAttribute
 TEST_P(URLRequestTestParameterizedSameSite,
@@ -6608,7 +6602,6 @@
 // TODO(svaldez): iOS tests are flaky with EmbeddedTestServer and transport
 // security state. (see http://crbug.com/550977).
 #if !defined(OS_IOS)
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(URLRequestTestHTTP, ProcessSTS) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
   https_test_server.SetSSLConfig(
@@ -6643,7 +6636,6 @@
   EXPECT_FALSE(pkp_state.HasPublicKeyPins());
 #endif
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 TEST_F(URLRequestTestHTTP, STSNotProcessedOnIP) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
@@ -6673,7 +6665,6 @@
 const char kHPKPReportUri[] = "https://hpkp-report.test";
 }  // namespace
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 // Tests that enabling HPKP on a domain does not affect the HSTS
 // validity/expiration.
 TEST_F(URLRequestTestHTTP, ProcessPKP) {
@@ -6709,7 +6700,6 @@
   EXPECT_EQ(report_uri, pkp_state.report_uri);
   EXPECT_NE(sts_state.expiry, pkp_state.expiry);
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 // Tests that reports get sent on HPKP violations when a report-uri is set.
 TEST_F(URLRequestTestHTTP, ProcessPKPAndSendReport) {
@@ -6978,7 +6968,6 @@
   EXPECT_TRUE(request->ssl_info().pkp_bypassed);
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(URLRequestTestHTTP, ProcessSTSOnce) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
   https_test_server.SetSSLConfig(
@@ -7089,7 +7078,6 @@
   EXPECT_TRUE(sts_state.include_subdomains);
   EXPECT_FALSE(pkp_state.include_subdomains);
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 // An ExpectCTReporter that records the number of times OnExpectCTFailed() was
 // called.
@@ -7429,7 +7417,6 @@
   EXPECT_TRUE(reporting_service.headers().empty());
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(URLRequestTestHTTP, ProcessReportToHeaderHTTPS) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
   https_test_server.RegisterRequestHandler(
@@ -7454,7 +7441,6 @@
   EXPECT_EQ(request_url, reporting_service.headers()[0].url);
   EXPECT_EQ("foo, bar", reporting_service.headers()[0].header_value);
 }
-#endif
 
 TEST_F(URLRequestTestHTTP, DontProcessReportToHeaderInvalidHttps) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
@@ -7603,7 +7589,6 @@
   EXPECT_TRUE(nel_service.headers().empty());
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(URLRequestTestHTTP, ProcessNelHeaderHttps) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
   https_test_server.RegisterRequestHandler(base::BindRepeating(&SendNelHeader));
@@ -7630,7 +7615,6 @@
   EXPECT_TRUE(nel_service.headers()[0].MatchesAddressList(address_list));
   EXPECT_EQ("foo", nel_service.headers()[0].value);
 }
-#endif
 
 TEST_F(URLRequestTestHTTP, DontProcessNelHeaderInvalidHttps) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
@@ -7731,7 +7715,6 @@
   URLRequestFilter::GetInstance()->ClearHandlers();
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 // Also test with a real server, to exercise interactions with
 // URLRequestHttpJob.
 TEST_F(URLRequestTestHTTP, ForwardErrorToNelHttps_Real) {
@@ -7759,7 +7742,6 @@
   EXPECT_EQ(0, nel_service.errors()[0].status_code);
   EXPECT_EQ(ERR_EMPTY_RESPONSE, nel_service.errors()[0].type);
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 TEST_F(URLRequestTestHTTP, NelReportUserAgentWithHeaderWithSettings) {
   EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
@@ -9653,7 +9635,7 @@
   VerifyReferrerAfterRedirect(URLRequest::NO_REFERRER, GURL(), GURL());
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
+
 TEST_F(URLRequestTestReferrerPolicy, HTTPSToSameOriginHTTPS) {
   InstantiateSameOriginServers(net::EmbeddedTestServer::TYPE_HTTPS);
   GURL referrer = origin_server()->GetURL("/path/to/file.html");
@@ -9815,7 +9797,6 @@
 
   VerifyReferrerAfterRedirect(URLRequest::NO_REFERRER, GURL(), GURL());
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 class HTTPSRequestTest : public TestWithScopedTaskEnvironment {
  public:
@@ -9832,7 +9813,6 @@
   TestURLRequestContext default_context_;
 };
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 TEST_F(HTTPSRequestTest, HTTPSGetTest) {
   EmbeddedTestServer test_server(net::EmbeddedTestServer::TYPE_HTTPS);
   test_server.AddDefaultHandlers(
@@ -9859,7 +9839,6 @@
               r->GetSocketAddress().port());
   }
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 TEST_F(HTTPSRequestTest, HTTPSMismatchedTest) {
   EmbeddedTestServer test_server(net::EmbeddedTestServer::TYPE_HTTPS);
@@ -10237,7 +10216,6 @@
 
 }  // namespace
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 // TODO(davidben): Test the rest of the code. Specifically,
 // - Filtering which certificates to select.
 // - Getting a certificate request in an SSL renegotiation sending the
@@ -10359,7 +10337,6 @@
     EXPECT_EQ(2, private_key->sign_count());
   }
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 
 // Test that private keys that fail to sign anything get evicted from the cache.
 TEST_F(HTTPSRequestTest, ClientAuthFailSigning) {
@@ -10439,7 +10416,6 @@
   }
 }
 
-#if !defined(STARBOARD_NO_LOCAL_ISSUER)
 // Test that cached private keys that fail to sign anything trigger a
 // retry. This is so we handle unplugged smartcards
 // gracefully. https://crbug.com/813022.
@@ -10522,7 +10498,6 @@
     EXPECT_EQ(0, d.bytes_received());
   }
 }
-#endif  // defined(STARBOARD_NO_LOCAL_ISSUER)
 #endif  // !defiend(OS_IOS)
 #if !defined(STARBOARD)
 #if !defined(OS_IOS)
diff --git a/src/starboard/android/shared/gyp_configuration.gypi b/src/starboard/android/shared/gyp_configuration.gypi
index faa78d0..12dd798 100644
--- a/src/starboard/android/shared/gyp_configuration.gypi
+++ b/src/starboard/android/shared/gyp_configuration.gypi
@@ -48,14 +48,24 @@
     ],
     'compiler_flags_qa': [
       '-fno-rtti',
-      '-O2',
       '-gline-tables-only',
     ],
+    'compiler_flags_qa_size': [
+      '-Os',
+    ],
+    'compiler_flags_qa_speed': [
+      '-O2',
+    ],
     'compiler_flags_gold': [
       '-fno-rtti',
-      '-O2',
       '-gline-tables-only',
     ],
+    'compiler_flags_gold_size': [
+      '-Os',
+    ],
+    'compiler_flags_gold_speed': [
+      '-O2',
+    ],
     'platform_libraries': [
       '-lEGL',
       '-lGLESv2',
diff --git a/src/starboard/android/shared/starboard_platform.gypi b/src/starboard/android/shared/starboard_platform.gypi
index 186c9df..2401618 100644
--- a/src/starboard/android/shared/starboard_platform.gypi
+++ b/src/starboard/android/shared/starboard_platform.gypi
@@ -432,7 +432,7 @@
         '<(DEPTH)/starboard/shared/starboard/system_supports_resume.cc',
         '<(DEPTH)/starboard/shared/starboard/thread_checker.h',
         '<(DEPTH)/starboard/shared/starboard/window_set_default_options.cc',
-        '<(DEPTH)/starboard/shared/stub/cpu_features_get.cc',
+        '<(DEPTH)/starboard/shared/linux/cpu_features_get.cc',
         '<(DEPTH)/starboard/shared/stub/cryptography_create_transformer.cc',
         '<(DEPTH)/starboard/shared/stub/cryptography_destroy_transformer.cc',
         '<(DEPTH)/starboard/shared/stub/cryptography_get_tag.cc',
diff --git a/src/starboard/examples/glclear/main.cc b/src/starboard/examples/glclear/main.cc
index a54ef01..2a12c7a 100644
--- a/src/starboard/examples/glclear/main.cc
+++ b/src/starboard/examples/glclear/main.cc
@@ -23,12 +23,25 @@
 #include "starboard/system.h"
 #include "starboard/window.h"
 
-#if SB_API_VERSION >= 11
+#if SB_API_VERSION < 11
+
+// This example uses the updated EGL and GLES Starboard interfaces implemented
+// in Staboard API version 11. These interfaces substantially changed how EGL
+// and GLES are used, and are not compatible with previous methodologies. For
+// additional information, please refer to the following files:
+//
+//   //starboard/egl.h
+//   //starboard/gles.h
+//
+//   //cobalt/renderer/egl_and_gles.h
+
+void SbEventHandle(const SbEvent* event) {
+  SB_NOTREACHED() << "SB_API_VERSION must be >= 11.";
+}
+#else  // SB_API_VERSION >= 11
+
 #include "starboard/egl.h"
 #include "starboard/gles.h"
-#else   // SB_API_VERSION >= 11
-#error "This demo requires SB_API_VERSION >= 11."
-#endif  // SB_API_VERSION >= 11
 
 #define EGL_CALL(x)                                                    \
   do {                                                                 \
@@ -253,3 +266,4 @@
     default: {}
   }
 }
+#endif  // SB_API_VERSION < 11
diff --git a/src/starboard/shared/linux/cpu_features_get.cc b/src/starboard/shared/linux/cpu_features_get.cc
index 2eeedf1..f1247fc 100644
--- a/src/starboard/shared/linux/cpu_features_get.cc
+++ b/src/starboard/shared/linux/cpu_features_get.cc
@@ -40,6 +40,10 @@
 
 #include <cstdlib>
 
+#if defined(ANDROID) && SB_IS(ARCH_ARM)
+#include <asm/hwcap.h>
+#endif
+
 #include "starboard/common/log.h"
 #include "starboard/shared/starboard/cpu_features.h"
 
@@ -49,7 +53,8 @@
 
 #if SB_IS(ARCH_ARM)
 
-#if SB_IS(32_BIT)
+// Android hwcap.h defines these flags conditionally, depending on target arch
+#if SB_IS(32_BIT) || defined(ANDROID)
 // See <arch/arm/include/uapi/asm/hwcap.h> kernel header.
 #define HWCAP_VFP (1 << 6)
 #define HWCAP_IWMMXT (1 << 9)
diff --git a/src/starboard/shared/starboard/audio_sink/audio_sink_create.cc b/src/starboard/shared/starboard/audio_sink/audio_sink_create.cc
index 00605fc..a9428dc 100644
--- a/src/starboard/shared/starboard/audio_sink/audio_sink_create.cc
+++ b/src/starboard/shared/starboard/audio_sink/audio_sink_create.cc
@@ -15,13 +15,7 @@
 #include "starboard/audio_sink.h"
 
 #include "starboard/common/log.h"
-#include "starboard/shared/starboard/application.h"
 #include "starboard/shared/starboard/audio_sink/audio_sink_internal.h"
-#include "starboard/shared/starboard/command_line.h"
-
-namespace {
-const char kUseStubAudioSinkSwitch[] = "use_stub_audio_sink";
-}  // namespace
 
 SbAudioSink SbAudioSinkCreate(
     int channels,
@@ -76,32 +70,29 @@
     return kSbAudioSinkInvalid;
   }
 
-  auto command_line =
-      starboard::shared::starboard::Application::Get()->GetCommandLine();
-  if (!command_line->HasSwitch(kUseStubAudioSinkSwitch)) {
-    if (auto type = SbAudioSinkPrivate::GetPrimaryType()) {
-      SbAudioSink audio_sink = type->Create(
-          channels, sampling_frequency_hz, audio_sample_type,
-          audio_frame_storage_type, frame_buffers, frame_buffers_size_in_frames,
-          update_source_status_func, consume_frames_func, context);
-      if (type->IsValid(audio_sink)) {
-        return audio_sink;
-      } else {
-        type->Destroy(audio_sink);
-      }
-    }
+  auto audio_sink_type = SbAudioSinkPrivate::GetPreferredType();
+  if (!audio_sink_type) {
+    return kSbAudioSinkInvalid;
   }
-
-  if (auto type = SbAudioSinkPrivate::GetFallbackType()) {
-    SB_LOG(WARNING) << "Primary audio sink failed to create, use fallback.";
-    return type->Create(channels, sampling_frequency_hz, audio_sample_type,
-                        audio_frame_storage_type, frame_buffers,
-                        frame_buffers_size_in_frames, update_source_status_func,
-                        consume_frames_func, context);
-  } else {
-    SB_LOG(WARNING) << "Primary audio sink failed to create,"
-                    << " fallback is not enabled.";
+  SbAudioSink audio_sink = audio_sink_type->Create(
+      channels, sampling_frequency_hz, audio_sample_type,
+      audio_frame_storage_type, frame_buffers, frame_buffers_size_in_frames,
+      update_source_status_func, consume_frames_func, context);
+  if (audio_sink_type->IsValid(audio_sink)) {
+    return audio_sink;
   }
-
+  audio_sink_type->Destroy(audio_sink);
+  auto fallback_audio_sink_type = SbAudioSinkPrivate::GetFallbackType();
+  if (!fallback_audio_sink_type) {
+    return kSbAudioSinkInvalid;
+  }
+  audio_sink = fallback_audio_sink_type->Create(
+      channels, sampling_frequency_hz, audio_sample_type,
+      audio_frame_storage_type, frame_buffers, frame_buffers_size_in_frames,
+      update_source_status_func, consume_frames_func, context);
+  if (fallback_audio_sink_type->IsValid(audio_sink)) {
+    return audio_sink;
+  }
+  fallback_audio_sink_type->Destroy(audio_sink);
   return kSbAudioSinkInvalid;
 }
diff --git a/src/starboard/shared/starboard/audio_sink/audio_sink_internal.cc b/src/starboard/shared/starboard/audio_sink/audio_sink_internal.cc
index ed1bf94..6614fea 100644
--- a/src/starboard/shared/starboard/audio_sink/audio_sink_internal.cc
+++ b/src/starboard/shared/starboard/audio_sink/audio_sink_internal.cc
@@ -13,7 +13,10 @@
 // limitations under the License.
 
 #include "starboard/shared/starboard/audio_sink/audio_sink_internal.h"
+
+#include "starboard/shared/starboard/application.h"
 #include "starboard/shared/starboard/audio_sink/stub_audio_sink_type.h"
+#include "starboard/shared/starboard/command_line.h"
 
 namespace {
 
@@ -21,6 +24,10 @@
 SbAudioSinkPrivate::Type* primary_audio_sink_type;
 SbAudioSinkPrivate::Type* fallback_audio_sink_type;
 
+// Command line switch that controls whether we default to the stub audio sink,
+// even when the primary audio sink may be available.
+const char kUseStubAudioSink[] = "use_stub_audio_sink";
+
 }  // namespace
 
 using starboard::shared::starboard::audio_sink::StubAudioSinkType;
@@ -58,3 +65,22 @@
   }
   return NULL;
 }
+
+// static
+SbAudioSinkPrivate::Type* SbAudioSinkPrivate::GetPreferredType() {
+  SbAudioSinkPrivate::Type* audio_sink_type = NULL;
+  auto command_line =
+      starboard::shared::starboard::Application::Get()->GetCommandLine();
+  if (!command_line->HasSwitch(kUseStubAudioSink)) {
+    audio_sink_type = SbAudioSinkPrivate::GetPrimaryType();
+  }
+  if (!audio_sink_type) {
+    SB_LOG(WARNING) << "Primary audio sink type not selected or missing, "
+                       "opting to use Fallback instead.";
+    audio_sink_type = SbAudioSinkPrivate::GetFallbackType();
+  }
+  if (audio_sink_type == NULL) {
+    SB_LOG(WARNING) << "Fallback audio sink type is not enabled.";
+  }
+  return audio_sink_type;
+}
diff --git a/src/starboard/shared/starboard/audio_sink/audio_sink_internal.h b/src/starboard/shared/starboard/audio_sink/audio_sink_internal.h
index 89eb5ea..1c8e57f 100644
--- a/src/starboard/shared/starboard/audio_sink/audio_sink_internal.h
+++ b/src/starboard/shared/starboard/audio_sink/audio_sink_internal.h
@@ -61,6 +61,10 @@
   // enabled.  Otherwise return NULL.
   static Type* GetFallbackType();
 
+  // Return a valid Type, choosing the Primary type if available, otherwise
+  // Fallback. If Fallback is not enabled, then returns NULL.
+  static Type* GetPreferredType();
+
   // Individual implementation has to provide implementation of the following
   // functions, which will be called inside Initialize() and TearDown().
   static void PlatformInitialize();
diff --git a/src/starboard/shared/starboard/player/filter/audio_renderer_sink_impl.cc b/src/starboard/shared/starboard/player/filter/audio_renderer_sink_impl.cc
index 9c70287..73d0877 100644
--- a/src/starboard/shared/starboard/player/filter/audio_renderer_sink_impl.cc
+++ b/src/starboard/shared/starboard/player/filter/audio_renderer_sink_impl.cc
@@ -65,14 +65,46 @@
     RenderCallback* render_callback) {
   SB_DCHECK(thread_checker_.CalledOnValidThread());
   SB_DCHECK(!HasStarted());
+  SB_DCHECK(channels > 0 && channels <= SbAudioSinkGetMaxChannels());
+  SB_DCHECK(sampling_frequency_hz > 0);
+  SB_DCHECK(SbAudioSinkIsAudioSampleTypeSupported(audio_sample_type));
+  SB_DCHECK(
+      SbAudioSinkIsAudioFrameStorageTypeSupported(audio_frame_storage_type));
+  SB_DCHECK(frame_buffers);
+  SB_DCHECK(frames_per_channel > 0);
 
   Stop();
   render_callback_ = render_callback;
-  audio_sink_ = SbAudioSinkCreate(
-      channels, sampling_frequency_hz, audio_sample_type,
-      audio_frame_storage_type, frame_buffers, frames_per_channel,
-      &AudioRendererSinkImpl::UpdateSourceStatusFunc,
-      &AudioRendererSinkImpl::ConsumeFramesFunc, this);
+  audio_sink_ = kSbAudioSinkInvalid;
+  SbAudioSinkPrivate::Type* audio_sink_type =
+      SbAudioSinkPrivate::GetPreferredType();
+  if (audio_sink_type) {
+    audio_sink_ = audio_sink_type->Create(
+        channels, sampling_frequency_hz, audio_sample_type,
+        audio_frame_storage_type, frame_buffers, frames_per_channel,
+        &AudioRendererSinkImpl::UpdateSourceStatusFunc,
+        &AudioRendererSinkImpl::ConsumeFramesFunc, this);
+    if (!audio_sink_type->IsValid(audio_sink_)) {
+      SB_LOG(WARNING) << "Created invalid SbAudioSink from "
+                         "SbAudioSinkPrivate::Type. Destroying and "
+                         "resetting.";
+      audio_sink_type->Destroy(audio_sink_);
+      audio_sink_ = kSbAudioSinkInvalid;
+      auto fallback_type = SbAudioSinkPrivate::GetFallbackType();
+      if (fallback_type) {
+        audio_sink_ = fallback_type->Create(
+            channels, sampling_frequency_hz, audio_sample_type,
+            audio_frame_storage_type, frame_buffers, frames_per_channel,
+            &AudioRendererSinkImpl::UpdateSourceStatusFunc,
+            &AudioRendererSinkImpl::ConsumeFramesFunc, this);
+        if (!fallback_type->IsValid(audio_sink_)) {
+          SB_LOG(ERROR) << "Failed to create SbAudioSink from Fallback type.";
+          fallback_type->Destroy(audio_sink_);
+          audio_sink_ = kSbAudioSinkInvalid;
+        }
+      }
+    }
+  }
   if (!SbAudioSinkIsValid(audio_sink_)) {
     return;
   }
diff --git a/src/starboard/shared/starboard/player/filter/video_render_algorithm_impl.cc b/src/starboard/shared/starboard/player/filter/video_render_algorithm_impl.cc
index afa527c..86151ff 100644
--- a/src/starboard/shared/starboard/player/filter/video_render_algorithm_impl.cc
+++ b/src/starboard/shared/starboard/player/filter/video_render_algorithm_impl.cc
@@ -12,9 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef STARBOARD_SHARED_STARBOARD_PLAYER_FILTER_VIDEO_RENDERER_INTERNAL_H_
-#define STARBOARD_SHARED_STARBOARD_PLAYER_FILTER_VIDEO_RENDERER_INTERNAL_H_
-
 #include "starboard/shared/starboard/player/filter/video_render_algorithm_impl.h"
 
 #include "starboard/common/log.h"
@@ -130,5 +127,3 @@
 }  // namespace starboard
 }  // namespace shared
 }  // namespace starboard
-
-#endif  // STARBOARD_SHARED_STARBOARD_PLAYER_FILTER_VIDEO_RENDERER_INTERNAL_H_
diff --git a/src/starboard/shared/starboard/player/filter/video_renderer_internal.cc b/src/starboard/shared/starboard/player/filter/video_renderer_internal.cc
index 8e415fc..cab42b7 100644
--- a/src/starboard/shared/starboard/player/filter/video_renderer_internal.cc
+++ b/src/starboard/shared/starboard/player/filter/video_renderer_internal.cc
@@ -119,6 +119,9 @@
 
   if (!first_input_written_) {
     first_input_written_ = true;
+#if SB_PLAYER_FILTER_ENABLE_STATE_CHECK
+    first_input_written_at_ = SbTimeGetMonotonicNow();
+#endif  // SB_PLAYER_FILTER_ENABLE_STATE_CHECK
     absolute_time_of_first_input_ = SbTimeGetMonotonicNow();
   }
 
@@ -277,6 +280,11 @@
     if (number_of_frames_.load() >=
             static_cast<int32_t>(decoder_->GetPrerollFrameCount()) &&
         seeking_.exchange(false)) {
+#if SB_PLAYER_FILTER_ENABLE_STATE_CHECK
+      SB_LOG(INFO) << "Video preroll takes "
+                   << SbTimeGetMonotonicNow() - first_input_written_at_
+                   << " microseconds.";
+#endif  // SB_PLAYER_FILTER_ENABLE_STATE_CHECK
       Schedule(prerolled_cb_);
     }
   }
diff --git a/src/starboard/shared/starboard/player/filter/video_renderer_internal.h b/src/starboard/shared/starboard/player/filter/video_renderer_internal.h
index d05c50b..0e1c85f 100644
--- a/src/starboard/shared/starboard/player/filter/video_renderer_internal.h
+++ b/src/starboard/shared/starboard/player/filter/video_renderer_internal.h
@@ -143,6 +143,8 @@
   SbTimeMonotonic time_of_last_lag_warning_;
 
   SbTimeMonotonic time_of_last_render_call_ = -1;
+
+  SbTimeMonotonic first_input_written_at_ = 0;
 #endif  // SB_PLAYER_FILTER_ENABLE_STATE_CHECK
 };
 
diff --git a/src/starboard/shared/starboard/player/player_worker.cc b/src/starboard/shared/starboard/player/player_worker.cc
index 47db56b..970c7b4 100644
--- a/src/starboard/shared/starboard/player/player_worker.cc
+++ b/src/starboard/shared/starboard/player/player_worker.cc
@@ -240,7 +240,7 @@
   SB_DCHECK(!error_occurred_);
   SB_DCHECK(ticket_ != ticket);
 
-  SB_DLOG(INFO) << "Try to seek to timestamp " << seek_to_time / kSbTimeSecond;
+  SB_DLOG(INFO) << "Try to seek to " << seek_to_time << " microseconds.";
 
   if (write_pending_sample_job_token_.is_valid()) {
     job_queue_->RemoveJobByToken(write_pending_sample_job_token_);
diff --git a/src/starboard/starboard_all.gyp b/src/starboard/starboard_all.gyp
index 083083d..a5b3291 100644
--- a/src/starboard/starboard_all.gyp
+++ b/src/starboard/starboard_all.gyp
@@ -61,9 +61,6 @@
         '<(DEPTH)/starboard/client_porting/eztime/eztime_test.gyp:*',
         '<(DEPTH)/starboard/client_porting/icu_init/icu_init.gyp:*',
         '<(DEPTH)/starboard/client_porting/poem/poem.gyp:*',
-	# glclear.gyp is not included as a dependency since the change to the
-	# EGL and GLES interfaces are breaking for previous versions of the
-	# Starboard API.
         '<(DEPTH)/starboard/examples/blitter/blitter.gyp:*',
         '<(DEPTH)/starboard/examples/window/window.gyp:*',
         '<(DEPTH)/starboard/nplb/blitter_pixel_tests/blitter_pixel_tests.gyp:*',
@@ -71,6 +68,11 @@
         '<(DEPTH)/starboard/starboard.gyp:*',
       ],
       'conditions': [
+        ['gl_type != "none"', {
+          'dependencies': [
+            '<(DEPTH)/starboard/examples/glclear/glclear.gyp:starboard_glclear_example',
+          ],
+        }],
         ['has_platform_tests=="True"', {
           'dependencies': [
             '<(DEPTH)/<(starboard_path)/starboard_platform_tests.gyp:*',
diff --git a/src/third_party/boringssl/boringssl.gyp b/src/third_party/boringssl/boringssl.gyp
index 4cae52c..a49f0d4 100644
--- a/src/third_party/boringssl/boringssl.gyp
+++ b/src/third_party/boringssl/boringssl.gyp
@@ -77,7 +77,6 @@
           'OPENSSL_NO_SEED',
           'OPENSSL_NO_STORE',
           'OPENSSL_NO_SOCK',  # Added by Cobalt to remove unused socket code.
-          'OPENSSL_NO_THREADS',  # Added by Cobalt to reduce overall threads count.
           'OPENSSL_NO_WHIRLPOOL',
           'OPENSSL_NO_POSIX_IO',
         ],
diff --git a/src/third_party/boringssl/src/config/starboard/openssl/opensslconf.h b/src/third_party/boringssl/src/config/starboard/openssl/opensslconf.h
index 3734c4d..8e12189 100644
--- a/src/third_party/boringssl/src/config/starboard/openssl/opensslconf.h
+++ b/src/third_party/boringssl/src/config/starboard/openssl/opensslconf.h
@@ -96,11 +96,6 @@
 #ifndef OPENSSL_NO_WHIRLPOOL
 # define OPENSSL_NO_WHIRLPOOL
 #endif
-// We set OPENSSL_NO_THREADS in boringssl.gyp. Set OPENSSL_THREADS here makes no
-// sense.
-// #ifndef OPENSSL_THREADS
-// # define OPENSSL_THREADS
-// #endif
 
 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
 # define OPENSSL_NO_DYNAMIC_ENGINE
diff --git a/src/third_party/boringssl/src/crypto/cpu-starboard.c b/src/third_party/boringssl/src/crypto/cpu-starboard.c
index 2f7609c..070a8c9 100644
--- a/src/third_party/boringssl/src/crypto/cpu-starboard.c
+++ b/src/third_party/boringssl/src/crypto/cpu-starboard.c
@@ -72,7 +72,7 @@
 static bool starboard_cpuid_setup_x86(void) { return true; }
 #endif // defined(OPENSSL_X86 || OPENSSL_X86_64)
 
-#if defined(OPENSSL_ARM)
+#if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
 
 #include <openssl/arm_arch.h>
 
@@ -108,7 +108,7 @@
 
 #else
 static bool starboard_cpuid_setup_arm(void) { return true; }
-#endif // OPENSSL_ARM
+#endif // OPENSSL_ARM || OPENSSL_AARCH64
 
 void OPENSSL_cpuid_setup_starboard(void) {
     if (!starboard_cpuid_setup_arm() ||
diff --git a/src/third_party/boringssl/src/crypto/internal.h b/src/third_party/boringssl/src/crypto/internal.h
index dc9c61b..41bbe33 100644
--- a/src/third_party/boringssl/src/crypto/internal.h
+++ b/src/third_party/boringssl/src/crypto/internal.h
@@ -136,6 +136,7 @@
 #endif
 #endif
 
+#if !defined(STARBOARD)
 #if !defined(OPENSSL_NO_THREADS) && \
     (!defined(OPENSSL_WINDOWS) || defined(__MINGW32__))
 #include <pthread.h>
@@ -149,6 +150,7 @@
 #include <windows.h>
 OPENSSL_MSVC_PRAGMA(warning(pop))
 #endif
+#endif  // !defined(STARBOARD)
 
 #if defined(__cplusplus)
 extern "C" {
diff --git a/src/third_party/boringssl/src/crypto/thread_none.c b/src/third_party/boringssl/src/crypto/thread_none.c
index 8475854..718d960 100644
--- a/src/third_party/boringssl/src/crypto/thread_none.c
+++ b/src/third_party/boringssl/src/crypto/thread_none.c
@@ -14,7 +14,7 @@
 
 #include "internal.h"
 
-#if defined(OPENSSL_NO_THREADS) && !defined(STARBOARD)
+#if defined(OPENSSL_NO_THREADS)
 
 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) {}
 
@@ -56,4 +56,4 @@
   return 1;
 }
 
-#endif  // OPENSSL_NO_THREADS && !STARBOARD
+#endif  // OPENSSL_NO_THREADS
diff --git a/src/third_party/boringssl/src/tool/internal.h b/src/third_party/boringssl/src/tool/internal.h
index b626270..b42613f 100644
--- a/src/third_party/boringssl/src/tool/internal.h
+++ b/src/third_party/boringssl/src/tool/internal.h
@@ -28,6 +28,11 @@
 
 #include <map>
 
+#if defined(STARBOARD)
+#define printf(fmt, ...) SbLogFormatF(fmt, ##__VA_ARGS__)
+#define fprintf(discard, fmt, ...) printf(fmt, ##__VA_ARGS__)
+#endif
+
 OPENSSL_MSVC_PRAGMA(warning(pop))
 
 #if defined(OPENSSL_WINDOWS)
diff --git a/src/third_party/libwebp/src/enc/picture_csp_enc.c b/src/third_party/libwebp/src/enc/picture_csp_enc.c
index 51a4619..4c0d9f8 100644
--- a/src/third_party/libwebp/src/enc/picture_csp_enc.c
+++ b/src/third_party/libwebp/src/enc/picture_csp_enc.c
@@ -35,11 +35,15 @@
 #define USE_INVERSE_ALPHA_TABLE
 
 #ifdef WORDS_BIGENDIAN
-#define ALPHA_OFFSET 0   // uint32_t 0xff000000 is 0xff,00,00,00 in memory
+// uint32_t 0xff000000 is 0xff,00,00,00 in memory
+#define CHANNEL_OFFSET(i) (i)
 #else
-#define ALPHA_OFFSET 3   // uint32_t 0xff000000 is 0x00,00,00,ff in memory
+// uint32_t 0xff000000 is 0x00,00,00,ff in memory
+#define CHANNEL_OFFSET(i) (3-(i))
 #endif
 
+#define ALPHA_OFFSET CHANNEL_OFFSET(0)
+
 //------------------------------------------------------------------------------
 // Detection of non-trivial transparency
 
@@ -1003,10 +1007,10 @@
     return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION);
   } else {
     const uint8_t* const argb = (const uint8_t*)picture->argb;
-    const uint8_t* const a = argb + (0 ^ ALPHA_OFFSET);
-    const uint8_t* const r = argb + (1 ^ ALPHA_OFFSET);
-    const uint8_t* const g = argb + (2 ^ ALPHA_OFFSET);
-    const uint8_t* const b = argb + (3 ^ ALPHA_OFFSET);
+    const uint8_t* const a = argb + CHANNEL_OFFSET(0);
+    const uint8_t* const r = argb + CHANNEL_OFFSET(1);
+    const uint8_t* const g = argb + CHANNEL_OFFSET(2);
+    const uint8_t* const b = argb + CHANNEL_OFFSET(3);
 
     picture->colorspace = WEBP_YUV420;
     return ImportYUVAFromRGBA(r, g, b, a, 4, 4 * picture->argb_stride,
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js
similarity index 66%
rename from src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
rename to src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js
index 450b4b3..bb846a4 100644
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
+++ b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js
@@ -1,12 +1,5 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constants</title>
-<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-constructor-object">
-<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-prototype-object">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
+'use strict';
+
 test(function() {
   // https://www.w3.org/Bugs/Public/show_bug.cgi?id=27732
   var constants = [
@@ -47,13 +40,12 @@
         assert_equals(object[name], i + 1, name)
         assert_own_property(object, name)
         var pd = Object.getOwnPropertyDescriptor(object, name)
-        assert_false("get" in pd, "property has getter")
-        assert_false("set" in pd, "property has setter")
-        assert_false(pd.writable, "not writable")
+        assert_false("get" in pd, "get")
+        assert_false("set" in pd, "set")
+        assert_false(pd.writable, "writable")
         assert_true(pd.enumerable, "enumerable")
-        assert_false(pd.configurable, "not configurable")
+        assert_false(pd.configurable, "configurable")
       }, "Constant " + name + " on " + description)
     })
   })
 })
-</script>
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js
new file mode 100644
index 0000000..a015470
--- /dev/null
+++ b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js
@@ -0,0 +1,32 @@
+test(function() {
+    assert_own_property(self, "DOMException", "property of global");
+
+    var desc = Object.getOwnPropertyDescriptor(self, "DOMException");
+    assert_false("get" in desc, "get");
+    assert_false("set" in desc, "set");
+    assert_true(desc.writable, "writable");
+    assert_false(desc.enumerable, "enumerable");
+    assert_true(desc.configurable, "configurable");
+}, "existence and property descriptor of DOMException");
+
+test(function() {
+    assert_own_property(self.DOMException, "prototype", "prototype property");
+
+    var desc = Object.getOwnPropertyDescriptor(self.DOMException, "prototype");
+    assert_false("get" in desc, "get");
+    assert_false("set" in desc, "set");
+    assert_false(desc.writable, "writable");
+    assert_false(desc.enumerable, "enumerable");
+    assert_false(desc.configurable, "configurable");
+}, "existence and property descriptor of DOMException.prototype");
+
+test(function() {
+    assert_own_property(self.DOMException.prototype, "constructor", "property of prototype");
+    var desc = Object.getOwnPropertyDescriptor(self.DOMException.prototype, "constructor");
+    assert_false("get" in desc, "get");
+    assert_false("set" in desc, "set");
+    assert_true(desc.writable, "writable");
+    assert_false(desc.enumerable, "enumerable");
+    assert_true(desc.configurable, "configurable");
+    assert_equals(self.DOMException.prototype.constructor, self.DOMException, "equality with actual constructor");
+}, "existence and property descriptor of DOMException.prototype.constructor");
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js
similarity index 75%
rename from src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html
rename to src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js
index 0e5ffea..d6e1cdd 100644
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html
+++ b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js
@@ -1,13 +1,5 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constructor</title>
-<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-constructor-object">
-<link rel=help href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-error.prototype.message">
-<link rel=help href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-error.prototype.name">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
+'use strict';
+
 test(function() {
   var ex = new DOMException();
   assert_equals(ex.name, "Error",
@@ -22,7 +14,7 @@
                "The name property should be inherited");
   assert_false(ex.hasOwnProperty("message"),
                "The message property should be inherited");
-}, 'new DOMException(): own-ness');
+}, 'new DOMException(): inherited-ness');
 
 test(function() {
   var ex = new DOMException(null);
@@ -46,7 +38,7 @@
                "The name property should be inherited");
   assert_false(ex.hasOwnProperty("message"),
                "The message property should be inherited");
-}, 'new DOMException(undefined): own-ness');
+}, 'new DOMException(undefined): inherited-ness');
 
 test(function() {
   var ex = new DOMException("foo");
@@ -59,9 +51,9 @@
   var ex = new DOMException("foo");
   assert_false(ex.hasOwnProperty("name"),
                "The name property should be inherited");
-  assert_true(ex.hasOwnProperty("message"),
-              "The message property should be own");
-}, 'new DOMException("foo"): own-ness');
+  assert_false(ex.hasOwnProperty("message"),
+              "The message property should be inherited");
+}, 'new DOMException("foo"): inherited-ness');
 
 test(function() {
   var ex = new DOMException("bar", undefined);
@@ -80,11 +72,11 @@
 
 test(function() {
   var ex = new DOMException("bar", "NotSupportedError");
-  assert_true(ex.hasOwnProperty("name"),
-              "The name property should be own");
-  assert_true(ex.hasOwnProperty("message"),
-              "The message property should be own");
-}, 'new DOMException("bar", "NotSupportedError"): own-ness');
+  assert_false(ex.hasOwnProperty("name"),
+              "The name property should be inherited");
+  assert_false(ex.hasOwnProperty("message"),
+              "The message property should be inherited");
+}, 'new DOMException("bar", "NotSupportedError"): inherited-ness');
 
 test(function() {
   var ex = new DOMException("bar", "foo");
@@ -127,13 +119,3 @@
                   "Should have matching legacy code from error names table");
   },'new DOMexception("msg", "' + test_case.name + '")');
 });
-
-test(function() {
-  var ex = new DOMException("bar", "UnknownError");
-  assert_equals(ex.name, "UnknownError", "Should be using the passed-in name");
-  assert_equals(ex.message, "bar", "Should still be using passed-in message");
-  assert_equals(ex.code, 0,
-                "Should have 0 for code for a name in the exception names table with no legacy code");
-}, 'new DOMException("bar", "UnknownError")');
-
-</script>
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js
new file mode 100644
index 0000000..fbbb8b3
--- /dev/null
+++ b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js
@@ -0,0 +1,129 @@
+"use strict";
+
+// Cobalt mozjs fails this.
+/*
+test(() => {
+  assert_throws(new TypeError(), () => DOMException());
+}, "Cannot construct without new");
+*/
+
+test(() => {
+  assert_equals(Object.getPrototypeOf(DOMException.prototype), Error.prototype);
+}, "inherits from Error: prototype-side");
+
+test(() => {
+  assert_equals(Object.getPrototypeOf(DOMException), Function.prototype);
+}, "does not inherit from Error: class-side");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_false(e.hasOwnProperty("message"), "property is not own");
+
+  const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "message");
+  assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+  assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+  assert_true(propDesc.enumerable, "property descriptor enumerable");
+  assert_true(propDesc.configurable, "property descriptor configurable");
+}, "message property descriptor");
+
+test(() => {
+  const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "message").get;
+
+  assert_throws(new TypeError(), () => getter.apply({}));
+}, "message getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_false(e.hasOwnProperty("name"), "property is not own");
+
+  const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "name");
+  assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+  assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+  assert_true(propDesc.enumerable, "property descriptor enumerable");
+  assert_true(propDesc.configurable, "property descriptor configurable");
+}, "name property descriptor");
+
+test(() => {
+  const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "name").get;
+
+  assert_throws(new TypeError(), () => getter.apply({}));
+}, "name getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_false(e.hasOwnProperty("code"), "property is not own");
+
+  const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "code");
+  assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+  assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+  assert_true(propDesc.enumerable, "property descriptor enumerable");
+  assert_true(propDesc.configurable, "property descriptor configurable");
+}, "code property descriptor");
+
+test(() => {
+  const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "code").get;
+
+  assert_throws(new TypeError(), () => getter.apply({}));
+}, "code getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+  const e = new DOMException("message", "InvalidCharacterError");
+  assert_equals(e.code, 5, "Initially the code is set to 5");
+
+  Object.defineProperty(e, "name", {
+    value: "WrongDocumentError"
+  });
+
+  assert_equals(e.code, 5, "The code is still set to 5");
+}, "code property is not affected by shadowing the name property");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_equals(Object.prototype.toString.call(e), "[object DOMException]");
+}, "Object.prototype.toString behavior is like other interfaces");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_false(e.hasOwnProperty("toString"), "toString must not exist on the instance");
+  assert_false(DOMException.prototype.hasOwnProperty("toString"), "toString must not exist on DOMException.prototype");
+  assert_equals(typeof e.toString, "function", "toString must still exist (via Error.prototype)");
+}, "Inherits its toString() from Error.prototype");
+
+test(() => {
+  const e = new DOMException("message", "name");
+  assert_equals(e.toString(), "name: message",
+    "The default Error.prototype.toString() behavior must work on supplied name and message");
+
+  Object.defineProperty(e, "name", { value: "new name" });
+  Object.defineProperty(e, "message", { value: "new message" });
+  assert_equals(e.toString(), "new name: new message",
+    "The default Error.prototype.toString() behavior must work on shadowed names and messages");
+}, "toString() behavior from Error.prototype applies as expected");
+
+// Cobalt mozjs fails this.
+/*
+test(() => {
+  assert_throws(new TypeError(), () => DOMException.prototype.toString());
+}, "DOMException.prototype.toString() applied to DOMException.prototype throws because of name/message brand checks");
+*/
+
+// Cobalt v8 fails this. Even the current Chrome fails this.
+/*
+test(() => {
+  let stackOnNormalErrors;
+  try {
+    throw new Error("normal error");
+  } catch (e) {
+    stackOnNormalErrors = e.stack;
+  }
+
+  let stackOnDOMException;
+  try {
+    throw new DOMException("message", "name");
+  } catch (e) {
+    stackOnDOMException = e.stack;
+  }
+
+  assert_equals(typeof stackOnDOMException, typeof stackOnNormalErrors, "The typeof values must match");
+}, "If the implementation has a stack property on normal errors, it also does on DOMExceptions");
+*/
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html
deleted file mode 100644
index ddb40f4..0000000
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constructor and prototype object</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src=constructor-object.js></script>
-<div id="log"></div>
-<script>
-setup({ explicit_done: true })
-run_test()
-</script>
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js
deleted file mode 100644
index e539d85..0000000
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js
+++ /dev/null
@@ -1,111 +0,0 @@
-function run_test() {
-    test(function() {
-        // "There MUST exist a property on the ECMAScript global object whose
-        // name is “DOMException” and value is an object called the
-        // DOMException constructor object, which provides access to legacy
-        // DOMException code constants. The property has the attributes
-        // { [[Writable]]: true, [[Enumerable]]: false,
-        // [[Configurable]]: true }."
-        assert_own_property(self, "DOMException",
-                            "self does not have own property \"DOMException\"");
-        var desc = Object.getOwnPropertyDescriptor(self, "DOMException");
-        assert_false("get" in desc, "self's property \"DOMException\" has getter");
-        assert_false("set" in desc, "self's property \"DOMException\" has setter");
-        assert_true(desc.writable, "self's property \"DOMException\" is not writable");
-        assert_false(desc.enumerable, "self's property \"DOMException\" is enumerable");
-        assert_true(desc.configurable, "self's property \"DOMException\" is not configurable");
-
-        // "The DOMException constructor object MUST be a function object but
-        // with a [[Prototype]] value of %Error% ([ECMA-262], section 6.1.7.4)."
-        assert_equals(Object.getPrototypeOf(self.DOMException), Error,
-                      "prototype of self's property \"DOMException\" is not Error");
-
-        // "Its [[Get]] internal property is set as described in ECMA-262
-        // section 9.1.8."
-        // Not much to test for this.
-        // "Its [[Construct]] internal property is set as described in ECMA-262
-        // section 19.2.2.3."
-        // "Its @@hasInstance property is set as described in ECMA-262 section
-        // 19.2.3.8, unless otherwise specified."
-
-        // String() returns something implementation-dependent, because it
-        // calls Function#toString.
-        assert_class_string(self.DOMException, "Function",
-                            "class string of DOMException");
-
-        // "For every legacy code listed in the error names table, there MUST
-        // be a property on the DOMException constructor object whose name and
-        // value are as indicated in the table. The property has attributes
-        // { [[Writable]]: false, [[Enumerable]]: true,
-        // [[Configurable]]: false }."
-        // See DOMException-constants.html.
-    }, "existence and properties of DOMException");
-
-    test(function() {
-        assert_own_property(self, "DOMException",
-                            "self does not have own property \"DOMException\"");
-
-        // "The DOMException constructor object MUST also have a property named
-        // “prototype” with attributes { [[Writable]]: false,
-        // [[Enumerable]]: false, [[Configurable]]: false } whose value is an
-        // object called the DOMException prototype object. This object also
-        // provides access to the legacy code values."
-        assert_own_property(self.DOMException, "prototype",
-                            'exception "DOMException" does not have own property "prototype"');
-        var desc = Object.getOwnPropertyDescriptor(self.DOMException, "prototype");
-        assert_false("get" in desc, "DOMException.prototype has getter");
-        assert_false("set" in desc, "DOMException.prototype has setter");
-        assert_false(desc.writable, "DOMException.prototype is writable");
-        assert_false(desc.enumerable, "DOMException.prototype is enumerable");
-        assert_false(desc.configurable, "DOMException.prototype is configurable");
-
-        // "The DOMException prototype object MUST have an internal
-        // [[Prototype]] property whose value is %ErrorPrototype% ([ECMA-262],
-        // section 6.1.7.4)."
-        assert_own_property(self, "Error",
-                            'should inherit from Error, but self has no such property');
-        assert_own_property(self.Error, "prototype",
-                            'should inherit from Error, but that object has no "prototype" property');
-        assert_equals(Object.getPrototypeOf(self.DOMException.prototype),
-                      self.Error.prototype,
-                      'prototype of DOMException.prototype is not Error.prototype');
-
-        // "The class string of the DOMException prototype object is
-        // “DOMExceptionPrototype”."
-        assert_class_string(self.DOMException.prototype, "DOMExceptionPrototype",
-                            "class string of DOMException.prototype");
-    }, "existence and properties of DOMException.prototype");
-
-    test(function() {
-        assert_false(self.DOMException.prototype.hasOwnProperty("name"),
-                     "DOMException.prototype should not have an own \"name\" " +
-                     "property.");
-        assert_false(self.DOMException.prototype.hasOwnProperty("code"),
-                     "DOMException.prototype should not have an own \"name\" " +
-                     "property.");
-    }, "existence of name and code properties on DOMException.prototype");
-
-    test(function() {
-        assert_own_property(self, "DOMException",
-                            "self does not have own property \"DOMException\"");
-        assert_own_property(self.DOMException, "prototype",
-                            'interface "DOMException" does not have own property "prototype"');
-
-        // "There MUST be a property named “constructor” on the DOMException
-        // prototype object with attributes { [[Writable]]: true,
-        // [[Enumerable]]: false, [[Configurable]]: true } and whose value is
-        // the DOMException constructor object."
-        assert_own_property(self.DOMException.prototype, "constructor",
-                            "DOMException" + '.prototype does not have own property "constructor"');
-        var desc = Object.getOwnPropertyDescriptor(self.DOMException.prototype, "constructor");
-        assert_false("get" in desc, "DOMException.prototype.constructor has getter");
-        assert_false("set" in desc, "DOMException.prototype.constructor has setter");
-        assert_true(desc.writable, "DOMException.prototype.constructor is not writable");
-        assert_false(desc.enumerable, "DOMException.prototype.constructor is enumerable");
-        assert_true(desc.configurable, "DOMException.prototype.constructor in not configurable");
-        assert_equals(self.DOMException.prototype.constructor, self.DOMException,
-                      "DOMException.prototype.constructor is not the same object as DOMException");
-    }, "existence and properties of exception interface prototype object's \"constructor\" property");
-
-    done();
-}
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js
deleted file mode 100644
index 7514924..0000000
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js
+++ /dev/null
@@ -1,3 +0,0 @@
-importScripts("/resources/testharness.js")
-importScripts("constructor-object.js")
-run_test();
diff --git a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html
index bc1d7fe..396d0a4 100644
--- a/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html
+++ b/src/third_party/web_platform_tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html
@@ -1,4 +1,5 @@
 <!doctype html>
+<meta charset=utf-8>
 <title>DOMException-throwing tests</title>
 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
 <div id=log></div>
@@ -19,90 +20,31 @@
 setup({explicit_done: true});
 
 function testException(exception, global, desc) {
-  // https://heycam.github.io/webidl/#es-exception-objects
-  // (as of 2015-01-03): "The value of the internal [[Prototype]] property of a
-  // DOMException object MUST be the DOMException prototype object from the
-  // global environment the exception object is associated with."
   test(function() {
     assert_equals(global.Object.getPrototypeOf(exception),
                   global.DOMException.prototype);
   }, desc + "Object.getPrototypeOf(exception) === DOMException.prototype");
 
 
-  // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
-  // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
-  // passing “name”, Property Descriptor { [[Value]]: /N/, [[Writable]]: true,
-  // [[Enumerable]]: true, [[Configurable]]: true }, and false as arguments."
   test(function() {
-    assert_true(exception.hasOwnProperty("name"));
+    assert_false(exception.hasOwnProperty("name"));
   }, desc + "exception.hasOwnProperty(\"name\")");
+  test(function() {
+    assert_false(exception.hasOwnProperty("message"));
+  }, desc + "exception.hasOwnProperty(\"message\")");
 
   test(function() {
     assert_equals(exception.name, "HierarchyRequestError");
   }, desc + "exception.name === \"HierarchyRequestError\"");
 
   test(function() {
-    var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
-    assert_true(desc.writable, "must be writable");
-    assert_true(desc.enumerable, "must be enumerable");
-    assert_true(desc.configurable, "must be configurable");
-  }, desc + "Object.getOwnPropertyDescriptor(exception, \"name\")");
-
-
-  // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
-  // (as of 2015-01-03): "If the optional user agent-defined message /M/ was
-  // specified, then this list has a single element whose value is the result
-  // of converting /M/ to a String value. Otherwise, the list is empty."
-  //
-  // https://heycam.github.io/webidl/#es-DOMException-constructor-object
-  // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
-  // passing “message”, Property Descriptor { [[Value]]: /S/,
-  // [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }, and
-  // false as arguments."
-  test(function() {
-    if (exception.hasOwnProperty("message")) {
-      var desc = global.Object.getOwnPropertyDescriptor(exception, "message");
-      assert_true(desc.writable, "must be writable");
-      assert_false(desc.enumerable, "must not be enumerable");
-      assert_true(desc.configurable, "must be configurable");
-    }
-  }, desc + "Object.getOwnPropertyDescriptor(exception, \"message\")");
-
-  test(function() {
-    if (exception.hasOwnProperty("message")) {
-      // Can't test anything more specific, since it's implementation-defined :(
-      assert_equals(typeof exception.message, "string");
-    } else {
-      // Error.prototype.message
-      assert_equals(exception.message, "");
-    }
-  }, desc + "typeof exception.message === \"string\"");
-
-
-  // https://heycam.github.io/webidl/#es-exception-objects
-  // (as of 2015-01-03): "The class string of a DOMException object MUST be
-  // “DOMException”."
-  test(function() {
-    assert_equals(global.Object.prototype.toString.call(exception),
-                  "[object DOMException]");
-  }, desc + "Object.prototype.toString.call(exception) === \"[object DOMException]\"");
-
-
-  // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
-  // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
-  // passing “code”, Property Descriptor { [[Value]]: /code/,
-  // [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }, and
-  // false as arguments."
-  test(function() {
     assert_equals(exception.code, global.DOMException.HIERARCHY_REQUEST_ERR);
   }, desc + "exception.code === DOMException.HIERARCHY_REQUEST_ERR");
 
   test(function() {
-    var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
-    assert_true(desc.writable, "must be writable");
-    assert_true(desc.enumerable, "must be enumerable");
-    assert_true(desc.configurable, "must be configurable");
-  }, desc + "Object.getOwnPropertyDescriptor(exception, \"code\")");
+    assert_equals(global.Object.prototype.toString.call(exception),
+                  "[object DOMException]");
+  }, desc + "Object.prototype.toString.call(exception) === \"[object DOMException]\"");
 }
 
 
diff --git a/src/third_party/web_platform_tests/dom/abort/event.any.js b/src/third_party/web_platform_tests/dom/abort/event.any.js
new file mode 100644
index 0000000..d566bec
--- /dev/null
+++ b/src/third_party/web_platform_tests/dom/abort/event.any.js
@@ -0,0 +1,68 @@
+test(t => {
+  const c = new AbortController(),
+        s = c.signal;
+  let state = "begin";
+
+  assert_false(s.aborted);
+
+  s.addEventListener("abort",
+    t.step_func(e => {
+      assert_equals(state, "begin");
+      state = "aborted";
+    })
+  );
+  c.abort();
+
+  assert_equals(state, "aborted");
+  assert_true(s.aborted);
+
+  c.abort();
+}, "AbortController abort() should fire event synchronously");
+
+test(t => {
+  const controller = new AbortController();
+  const signal = controller.signal;
+  assert_equals(controller.signal, signal,
+                "value of controller.signal should not have changed");
+  controller.abort();
+  assert_equals(controller.signal, signal,
+                "value of controller.signal should still not have changed");
+}, "controller.signal should always return the same object");
+
+test(t => {
+  const controller = new AbortController();
+  const signal = controller.signal;
+  let eventCount = 0;
+  signal.onabort = () => {
+    ++eventCount;
+  };
+  controller.abort();
+  assert_true(signal.aborted);
+  assert_equals(eventCount, 1, "event handler should have been called once");
+  controller.abort();
+  assert_true(signal.aborted);
+  assert_equals(eventCount, 1,
+                "event handler should not have been called again");
+}, "controller.abort() should do nothing the second time it is called");
+
+test(t => {
+  const controller = new AbortController();
+  controller.abort();
+  controller.signal.onabort =
+      t.unreached_func("event handler should not be called");
+}, "event handler should not be called if added after controller.abort()");
+
+test(t => {
+  const controller = new AbortController();
+  const signal = controller.signal;
+  signal.onabort = t.step_func(e => {
+    assert_equals(e.type, "abort", "event type should be abort");
+    assert_equals(e.target, signal, "event target should be signal");
+    assert_false(e.bubbles, "event should not bubble");
+    // Cobalt does not support Event.isTrusted
+    // assert_true(e.isTrusted, "event should be trusted");
+  });
+  controller.abort();
+}, "the abort event should have the right properties");
+
+done();