Bug 1738971 Comment 15 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This seems to cause build failures with some unified builds:

```
 0:37.94 In file included from UnifiedBindings10.cpp:2:                                                                                                                                           
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dom/bindings/HTMLPictureElementBinding.cpp:19:                                                                       
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/BindingUtils.h:30:                                                                          
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/Document.h:48:                                                                              
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/AnimationFrameProvider.h:10:                                                                
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/AnimationFrameProviderBinding.h:12:                                                         
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:133:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.94   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.94          ^                                                                                                                                                                               
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:153:21: error: use of undeclared identifier 'NonRefcountedDOMObject'                                  
 0:37.94     std::is_base_of<NonRefcountedDOMObject, T>::value, bool>                                                                                                                             
 0:37.94                     ^                                                                                                                                                                    
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:181:21: error: use of undeclared identifier 'NonRefcountedDOMObject'                                  
 0:37.94     std::is_base_of<NonRefcountedDOMObject, T>::value, bool>                                                                                                                             
 0:37.94                     ^                                                                                                                                                                    
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:253:10: error: use of undeclared identifier 'XPCOMObjectToJsval'                                      
 0:37.94   return XPCOMObjectToJsval(aCx, scope, helper, &iid, true, aValue);                                                                                                                     
 0:37.94          ^                                                                                                                                                                               
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:290:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.94   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.94          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:296:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:305:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:313:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:322:10: error: use of undeclared identifier 'MaybeWrapObjectOrNullValue'                              
 0:37.95   return MaybeWrapObjectOrNullValue(aCx, aValue);                                                                                                                                        
 0:37.95          ^                                                                                                                                                                               
 0:37.95 9 errors generated.
```

As fas as I can tell, this is because BindingUtils.h includes Document.h, which itself pulls AnimationFrameProviderBinding.h : at this point we need `MaybeWrapValue()` from BindingUtils.h, but the include guard prevent it from being loaded again.
This seems to cause build failures with some unified builds:

```
 0:37.94 In file included from UnifiedBindings10.cpp:2:                                                                                                                                           
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dom/bindings/HTMLPictureElementBinding.cpp:19:                                                                       
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/BindingUtils.h:30:                                                                          
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/Document.h:48:                                                                              
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/AnimationFrameProvider.h:10:                                                                
 0:37.94 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/AnimationFrameProviderBinding.h:12:                                                         
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:133:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.94   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.94          ^                                                                                                                                                                               
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:153:21: error: use of undeclared identifier 'NonRefcountedDOMObject'                                  
 0:37.94     std::is_base_of<NonRefcountedDOMObject, T>::value, bool>                                                                                                                             
 0:37.94                     ^                                                                                                                                                                    
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:181:21: error: use of undeclared identifier 'NonRefcountedDOMObject'                                  
 0:37.94     std::is_base_of<NonRefcountedDOMObject, T>::value, bool>                                                                                                                             
 0:37.94                     ^                                                                                                                                                                    
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:253:10: error: use of undeclared identifier 'XPCOMObjectToJsval'                                      
 0:37.94   return XPCOMObjectToJsval(aCx, scope, helper, &iid, true, aValue);                                                                                                                     
 0:37.94          ^                                                                                                                                                                               
 0:37.94 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:290:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.94   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.94          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:296:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:305:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:313:10: error: use of undeclared identifier 'MaybeWrapValue'                                          
 0:37.95   return MaybeWrapValue(aCx, aValue);                                                                                                                                                    
 0:37.95          ^                                                                                                                                                                               
 0:37.95 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:322:10: error: use of undeclared identifier 'MaybeWrapObjectOrNullValue'                              
 0:37.95   return MaybeWrapObjectOrNullValue(aCx, aValue);                                                                                                                                        
 0:37.95          ^                                                                                                                                                                               
 0:37.95 9 errors generated.
```

As fas as I can tell, this is because BindingUtils.h includes Document.h, which itself pulls AnimationFrameProviderBinding.h : at this point we need `MaybeWrapValue()` from BindingUtils.h, but the include guard prevents it from being included again.

Back to Bug 1738971 Comment 15